Isn't there just the one WeakIdentityKeyDictionary in ActionMaps on EventManager?
I guess you mean the finalization takes longer when there are more entries in the dictionary.
The same applies to changed/update when the model object doesn't inherit from Model (or also Morph, with the ui enhancements loaded).
In fact, the same approach can be taken to record events directly on the relevant object (as in the case of changed/update in the Model class).
-----Original Message----- From: ui-bounces@lists.squeakfoundation.org [mailto:ui-bounces@lists.squeakfoundation.org]On Behalf Of David T. Lewis Sent: 19 September 2007 11:46 AM To: Squeak's User Interface Subject: Re: [UI] Well, shall we do something then?
On Wed, Sep 19, 2007 at 12:38:44AM +0300, Igor Stasenko wrote:
On 18/09/2007, Gary Chambers gazzaguru2@btinternet.com wrote:
Well, there is the Model but there has to be a linkage for
when the model
changes. That's the basics. We need to decide on the way(s)
we wish that to
happen. I find changed/update rather inefficient. Much prefer
when:send:to:.
But that's just the start. Pretty fundamental though.
Yes! And i think this is the point where we should start from. How to create flexible event system , how exchange data between view and model. Based on that we then can build up a model which will use it (MVP/Morphic whatever)
A note of caution: The #when:send:to: mechanism can have serious performance issues due to its use of weak dictionaries. Performance of the entire image is seriously impacted by weak array finalization as the number of these dictionaries increases. There is no easy fix for this, so make sure you know what you are getting into before you start with an approach based on this mechanism.
Dave
UI mailing list UI@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/ui