> Am 11.03.2017 um 04:57 schrieb sergio ruiz :
>
> I have a simple one, but i need to understand what is going on..
>
> i have something like
>
> Tree
>
> with a class method
>
> trees
> ^ trees ifNil: [OrderedCollection new]
>
> i initially ran into trouble with it locking my image up beca
Also, you’re not setting the instance variable - just returning an
OrderedCollection - is that what you want to do?
e.g. setting the trees instance variable:
trees
^ trees ifNil: [ trees := OrderedCollection new ]
like Bernardo said, when you call #trees from within the #trees method (with
sel
i think that in the first case you access an instance variable trees while
in the second case you send a message trees to self that cause an infinite
recursion.
am i right?
On Sat, Mar 11, 2017 at 12:57 AM, sergio ruiz wrote:
> I have a simple one, but i need to understand what is going on..
>