The event target is set when the event is dispatched.

You can’t save the target in the constructor because it does not exist yet.

If you are not getting the target in an event handler, please provide some more 
code to show the issue.

HTH,
Harbs

> On Dec 26, 2019, at 12:57 PM, Maria Jose Esteve <mjest...@iest.com> wrote:
> 
> Sorry, there was an error ... (when renaming for the example)
>  
>  
> public function MyEvent(type:String)
> {
> super(type, true, true);
>             //_targetViewPopup = target;
> }
>  
> ----------------------------------------------------------------
>  
> Hi, see if anyone can help me ...
>  
> I have a MyEvent event that I launch from a MyView view (MVC):
>  
> public function SecurityEvent(type:String)
> {
> super(type, true, true);
>             //_targetViewPopup = target;
> }
>  
>  
> var mEvent:MyEvent = new MyEvent (MyEvent.ON_CHANGE);
> dispatchEvent(mEvent);
>  
> I need to save the reference to the view that generated the event, the 
> target, but I don't get it: target is null and currentTarget is undefined.
> I have debugged and I do not see any property or variable that contains this 
> data.
> Where can I get it? Any method?
>  
> I would appreciate any help.
> Thank you all.
>  
> Hiedra.
>  

Reply via email to