I think gordon's point was not
e.target = this;

you will implement your own Event class which will extend original Event 
class .
I hope the underlying variable which keeps the reference to the target 
is protected, not private;
so you can edit that value from your subclass.

yigit

Josh McDonald wrote:
> Nope :( I get 1059: Property is read-only when compiling this:
>
> var e : Event = new Event();
> e.target = this;
>
> -Josh
>
> On Fri, Aug 22, 2008 at 11:16 AM, Gordon Smith <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     You should be able to override the setter for 'target' in a
>     subclass of Event. There should be nothing special about it; it's
>     just a public getter/setter.
>
>      
>
>     Gordon Smith
>
>     Adobe Flex SDK Team
>
>      
>
>     ------------------------------------------------------------------------
>
>     *From:* [email protected]
>     <mailto:[email protected]>
>     [mailto:[email protected]
>     <mailto:[email protected]>] *On Behalf Of *Josh McDonald
>     *Sent:* Thursday, August 21, 2008 5:44 PM
>     *To:* [email protected] <mailto:[email protected]>
>     *Subject:* [flexcoders] Can an event know when it is dispatched?
>
>      
>
>     Hey guys,
>
>     I want to know if there's a (nice, probably secret) way to for an
>     event to know when it's dispatched? I could hook into a timer or
>     ENTER_FRAME and have it check for a valid target, but that's not
>     very nice :)
>
>     I haven't overloaded function set target, but I imagine that'll
>     give me either a compile-time error or a verifier error since
>     Event is Player-native, and I don't know what namespace to put it
>     in to begin with. I know about the mx_internal static hook in
>     UIComponent, but I want to catch certain events being dispatched
>     from non-visual components and complain about it (just to make
>     life easier for developers using my framework).
>
>     Cheers,
>     -Josh
>
>     -- 
>     "Therefore, send not to know For whom the bell tolls. It tolls for
>     thee."
>
>     :: Josh 'G-Funk' McDonald
>     :: 0437 221 380 :: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
>
>
>
> -- 
> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>  

Reply via email to