Hi Ian,

It seems like the "proper" way would be to create the extra
functions/classes to handle this. That would solve those two issues
which aren't major, but would make your code cleaner.

Its more effort/work I guess but it might pay off in the long run!
(Which is what clean code is all about isn't it?) :)

If you were doing a quick knock-out job then Delegate/Proxy might be the
solution for that situation though. ;)

Sunil

PS - There are more discussions at
http://stimpson.flashvacuum.net/mt/archives/2006/08/as_30_delegate.html
(you've probably see that already)

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian
Thomas
Sent: 25 July 2007 12:33
To: [email protected]
Subject: Re: [Flashcoders] AS3 Events

Oh - and off the top of my head I can think of two fairly obvious
objections/complications:
i) Not type safe at compile time (but should(?) complain at runtime if
the wrong argument types are sent, at least in the debug player)
ii) Potential memory leakage with creating a closure - you'll have to
remember to remove the Callback object as a listener (unless you're
using weak references).

Ian

On 7/25/07, Ian Thomas <[EMAIL PROTECTED]> wrote:
> On 7/25/07, Sunil Jolly <[EMAIL PROTECTED]> wrote:
> > Does anyone know why Delegate is frowned upon? Seems like a simple
and
> > elegant solution to the problem to me!
>
_______________________________________________
[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
_______________________________________________
[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

Reply via email to