On 07 Feb 2015, at 10:13, Marcus Denker <marcus.denker@inria.fr> wrote:
On 06 Feb 2015, at 18:15, Marcus Denker <marcus.denker@inria.fr> wrote:On 06 Feb 2015, at 11:50, Marcus Denker <marcus.denker@inria.fr> wrote:
Next: When building classes with Slots, the class builder need to call back on the slot and hand the class to each. Then the slot
can reflectively change the class, e.g. the PropertySlot will check if there is already a hidden property base slot and if not, add it
reflectively).
This is now done:
https://pharo.fogbugz.com/f/cases/14876/Add-call-back-in-ClassBuilder-to-call-slots-when-building-a-classSo, with this mechanism in place we can actually solve a nice problem: Slot initialisation.on #initialize, we want to hand the new object to each slot to give it a change to initialize it.Now addingself allSlots do: [ :slot | slot initialize: anObject ]to #initialize and doing that for all object is not good as this would slot down all #initialize calls.We might want to pay that later when if we happen to use it a lot, but now now.