9/20/2010 6:59:56 AM
Title:
How can I use the event name as const also in the Metadata?
is there a way to use a constant for the event name?
the event name is later on use for creation of event and then dispatch it.
write the string again in several places is an open to bugs.
<mx:Metadata>
[Event(name="EventName", type="mx.events.ItemClickEvent")]
</mx:Metadata>
...
...
<![CDATA[
var clickedEvent:ItemClickEvent = new ItemClickEvent("EventName");
dispatchEvent(clickedEvent);
]]>
9/20/2010 10:52:44 PM
Hello,
As fas as metadata concern i think we can't use constant for event name.
But by creation custom event we can use constant for event name.
Regards,
Virat Patel