[Newbies] Re: How do i list the execution order of objects inside a method?

Ron Teitelbaum ron at usmedrec.com
Wed Jan 30 15:08:24 UTC 2013

Hi Mircea,

>From: beginners-bounces at lists.squeakfoundation.org [mailto:beginners-bounces at lists.squeakfoundation.org] On Behalf Of mircea
>Sent: Wednesday, January 30, 2013 5:27 AM

>Conceptually i think i have the solution, as all the pieces seem to be available, but i think it will take some time before i slowly transition this mental >model to a "working" model given my lack of practical expertise.

See http://news.squeak.org/2006/11/07/ah-ha/#more-91 and the comments for some pointers that might help some.  The order of execution is all about the message send.  Object message.  What's the Object and what's the message.  The message is sent to the Object.  Sometimes what is the message is not easy to answer since it can be overridden by a subclass (polymorphism), or defined on a parent superclass (inheritance).  Sometimes the object is tricky!  aCollection add: anItem returns anItem not aCollection.  So aResult := aCollection add: anItem.  knowing what object aResult can be tricky.  The debugger is your friend.  (you can get aCollection by chaining messages to aCollection and asking it for its self.  aResult := aCollection add: anItem; yourself. aResult is now the collection).

Here is a good one:

instance := (MentalModel new)

Returns a good MentalModel instance.

All the best,

Ron Teitelbaum
Head Of Engineering
3d Immersive Collaboration Consulting
ron at 3dicc.com
Follow Me On Twitter: @RonTeitelbaum

More information about the Beginners mailing list