On 7/25/07, Muzak <[EMAIL PROTECTED]> wrote: > Hi Ian, > > Been thinking about this a bit more and you're correct, contextInfo doesn't > belong in class A and I'd go for storing a list of > contextInfos in class B.
Hiya Muzak, Yes, just been trying that one out. But (sadly!) again it doesn't hold water, as the contextInfos need to be in a hash/Dictionary, and need to have a key. For the general solution, it can be very difficult to find a unique key that can be recreated from the Event in the callback. For example, in the loader example I gave, object A could be used as the key (and recreated from Event.target). But not if A is a service object that gets used for each B request (i.e. use the same A lots instead of creating a new A each time). So what else could be used as a key? The url - no, because multiple overlapping requests could be issued to the same url (it has happened!). Tricky. A solution could be found for this instance - but not a general pattern. So I think I'm left with my Callback.create(handler,arg1,arg2) method (like old Delegate/Proxy), unless anyone has any better suggestions. Ian _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

