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] On
Behalf Of Josh McDonald
Sent: Thursday, August 21, 2008 5:44 PM
To: [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]> 

 

Reply via email to