Propogating slot changes in Morphs
Chris Double
chris.double at double.co.nz
Fri Apr 16 01:42:32 UTC 2010
When doing the scrolling changes in my image I added a slot to
WorldMorph to hold the current point when initiating the scroll. The
methods in the WorldMorph traits object used this to read/write and do
scrolling.
This didn't change existing WorldMorphs since they are clones of
WorldMorph and the data slots are actually held in the morph, not a
parent slot. So I manually re-added the slot in all existing
WorldMorph's to prevent errors when the WorldMorph trait methods were
called.
Is there a way to do this automatically when adding/changing slots in a
Morph? What's the idiom in Self for dealing with this sort of thing?
Chris.
--
http://www.bluishcoder.co.nz
More information about the Self-interest
mailing list