Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!bu.edu!bu-cs!bloom-beacon!eru!luth!sunic!mcsun!ukc!stl!idec!prlhp1!krause From: krause@prlhp1.prl.philips.co.uk (krause) Newsgroups: comp.lang.smalltalk Subject: Question on Ordered Collections Message-ID: <1045@prlhp1.prl.philips.co.uk> Date: 5 Feb 90 12:19:25 GMT Reply-To: krause@prlhp1.UUCP () Distribution: comp.lang.smalltalk Organization: Philips Research Laboratories, Redhill, UK Lines: 43 Hi, A quick smalltalk question. If you code something like: Fred <- OrderedCollection new add: 'anItem'; add: 'anOtherItem'; add: 'finalItem' Fred will NOT be an ordered collection, but a string. ------ coding: Fred <- OrderedCollection new add: 'anItem'; add: 'anOtherItem'; add: 'finalItem'; yourself Will result in Fred becoming an ordered collection. The funny thing is that yourself is a method that does nothing. I even coded up a dummy method for ordered collection and used that instead of yourself .... this resulted in Fred being correct. Code like Fred <- OrderedCollection new. Fred add: 'anItem'; add: 'anOtherItem'; add: 'finalItem' works as I currently expect. Has anyone any comments or suggestions? Exactly WHAT IS OCCURING? I have smalltalk version 2.3 running on an Apollo. David -----