I'm implementing an instance variable as an OrderedCollection, and am doing something idiotic.
I have an Artist class.
An Artist can have many tracks:
tracks
^ tracks ifNil: [ self tracks: OrderedCollection new ]
tracks: anObject
tracks := anObject
Doing something like:
a := Artist new.
t := Track new.
a tracks add: t
Gives me the error:
Artist(Object)>>doesNotUnderstand: #add:
Once I get past that error, which will evaluate `a tracks`, I can run this.
I get why it works the second time, but I don't get why it thinks the instance of Artist is the receiver of add: on the first run.
Thanks!