Peter, I like your proposed syntax. Seems more understandable (but I don't know nothing about announcements).
Cheers,
Offray
On 27/07/15 16:51, Peter Uhnák wrote:
Instead of (or alongside) a callback
anElement addCallback: (TRExtentCallback block: [ :event | "do something" ])
have an event
anElement when: TRExtentChanged do: [ :event | "do something" ]
While it looks like a subtle difference it's more versatile and doesn't introduce a different way to do things, when we already perfectly feasible way in pharo - Announcements.
And I am asking what do you think about such proposition.
Cheers, Peter
On Mon, Jul 27, 2015 at 10:03 PM, Alexandre Bergel <alexandre.bergel@me.com mailto:alexandre.bergel@me.com> wrote:
Hi Peter, I do not know whether this is the jetlag effect or not, but I do not understand your email. What do you mean that a callback be attached just like regular event? Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Jul 27, 2015, at 6:55 AM, Peter Uhnák <i.uhnak@gmail.com <mailto:i.uhnak@gmail.com>> wrote: Hi, this is just an idea that's been bugging me for some time... what if callbacks could be attached just like regular events? e.g. aBox when: TRExtentChanged do: [ :event | (self parentFor: aBox) rebuild ] Is there benefit in having some events as events and some as callbacks? Isn't event more versatile? What do you think? I should probably check how this is done in Bloc... Peter _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch <mailto:Moose-dev@iam.unibe.ch> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch <mailto:Moose-dev@iam.unibe.ch> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev