Square bracket before class definition in as3

I saw the embed tag that was used before the class definition, but I only saw that Keith uses them.

[Event(name="select", type="flash.events.Event")] [Event(name="close", type="flash.events.Event")] [Event(name="resize", type="flash.events.Event")] public class Window extends Component{ 

can someone tell me what this does?

+4
source share
1 answer

Most importantly, the Flex compiler uses it when interpreting MXML. But in fact, its just metadata, ASDocs and some code completion implementations will use it to show you the available events, but more about that.

Its in the docs here: http://livedocs.adobe.com/flex/3/html/help.html?content=createevents_3.html

Hope this helps!

(edited answer will be more accurate)

+9
source

Source: https://habr.com/ru/post/1347659/


All Articles