PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: Vander on May 14, 2008, 07:38:36



Title: WHATS EVENT METATAG?
Post by: Vander on May 14, 2008, 07:38:36
whats that event metatag, on the best practices document, in the mxml file for example?

i know i know that is about declaring event to the compiler, to use like a tag on component i dunno exactly, ive read on the manual... it can be on mxml or in the script too...
ive never used it.. and things works... im afraid that im missing something
seeing the loginform.mxml on the document, for example, i did not catch the utility of it, since its ='tryLogin' maybe if it was TRY_LOGIN hehe... im missing something

thanks


Title: Re: WHATS EVENT METATAG?
Post by: puremvc on May 15, 2008, 04:53:06
The event meta tag just provides hints to the MXML compiler and the IDE about events that a component will dispatch.theis gives you code completion on that event name when you are declaring an instance in MXML.

Unfortunately, the event name in the meta tag cannot be reference to a constant, because it is a compiler tag, so when it is parsed, the compiler does not yet know your constants.

-=Cliff> 


Title: Re: WHATS EVENT METATAG?
Post by: gencha on June 12, 2008, 07:15:51
It's also used in the AsDoc generation process. If properly used it'll make AsDoc generate a table of events the class dispatches.