You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by "Koch (US), Warren R" <wa...@boeing.com> on 2020/10/15 20:44:24 UTC

RE: [EXTERNAL] Re: How do I get the localId from an event?

The handler I have is a general one servicing about 30 checkboxes.  In Flex I could determine the id of the object (event.currentTarget.id) and do things based on which one it was.  I just figured it would be here too.

I'll do it some other way.

From: Carlos Rovira [mailto:carlosrovira@apache.org]
Sent: Thursday, October 15, 2020 3:14 PM
To: users@royale.apache.org
Subject: [EXTERNAL] Re: How do I get the localId from an event?


This message was sent from outside of Boeing. Please do not click links or open attachments unless you recognize the sender and know that the content is safe.




You can't. localid is internal, and you should need it (unless others say the opposite).
to get the instance in an event you have "event.target"

El jue., 15 oct. 2020 a las 22:03, wkoch (<wa...@boeing.com>>) escribió:
I'm sure this is simple but without a debugger I can't figure it out and I
can't find it in the docs

I've got a simple check box and handler

<b:CheckBox localId="Check" text="check1" change="DisplayChange(event)"
selected="true"/>

private function DisplayChange(event:Event):void{
 var item:String;
 item = event.currentTarget.localId;
}

I was hoping the string item would equal "Check" but I get back null.  How
can I determine the localId of the element that fired the Event?  Is there a
listing somewhere of the Event properties?  Am I using the wrong Event type?



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


--
Carlos Rovira
Apache Member & Apache Royale PMC
Apache Software Foundation
http://about.me/carlosrovira