[Pharo-project] Problem with Traits and #initialize.
renggli at gmail.com
Sat Jun 4 07:47:16 EDT 2011
>> What you observe is what is implemented in these methods. Normally you
>> should never call class-side initialize methods manually, the system
> yeah, the system *should* do it for me. I cannot reproduce it, but I find
> myself several times having to explicitly send class side #initialize
> becasue Monticello did not do it.
Monticello sends class side #initialize whenever it loads a new
version of that method, that is on initial load and/or when it updates
a method after load/merge. It does not send #initialize in any other
case and it does not send super #initialize methods (that would break
the system in most cases).
Note that this has exactly the same semantics as with change-sets: If
a change-set includes a class-side initialize method, it is executed
at the end of the file-in.
> ((PackageInfo named: 'XXX') classes select: [:each | each isBehavior ]) do: [:each | each initialize]
It does the "right" thing.
More information about the Pharo-dev