Oh, I'm so so sorry - I thought it was OK to ask dumb questions on the newbie forum (blush) I'll try to figure out how to make an instance variable an order collection.
-----Original Message----- From: Randal L. Schwartz [mailto:merlyn@stonehenge.com] Sent: Sunday, November 08, 2009 4:06 PM To: Christine Wolfe Cc: beginners@lists.squeakfoundation.org Subject: Re: [Newbies] OrderedCollection if imageMorphs
"Christine" == Christine Wolfe cwdw01@earthlink.net writes:
Christine> I created a class, SymbolArray, that is a subclass of Christine> OrderedCollection with the following initialize method. Each of the Christine> items I'm adding (SymbolBlank, SymbolGet, etc) is an imageMorph.
Ahh, there's the mistake... missed it before.
You really really really do *not* want to create a subclass of OrderedCollection.
Your object will *have* an OrderedCollection, but should not *be* one.
If you want to respond to all of the protocol of OrderedCollection, feel free to delegate it to your actual instance variable.
Yes, it's a bright shiny object to want to subclass that, but just like subclassing SmallInteger, it's both legal and dumb. :)