Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

What is this syntax?

Guest
May 18, 2009 May 18, 2009

Can someone tell me what this syntax is, or point me to some documentation that explains it?

package fl.controls.listClasses {

   // what are these?
    [Style(name="overSkin", type="Class")]
    [Style(name="disabledTextFormat", type="flash.text.TextFormat")]
    [Style(name="upSkin", type="Class")]

    public class CellRenderer...
    {
       ...
       ...

The lines in brackets are the syntax in question...

They appear to be package level declarations of anonymous arrays, filled by a (presumably static) call to Style?  With named arguments?

I don't get it.  What's being stored, here, where is it being stored, and how is it accessed?

Any illumination appreciated...

rickb

TOPICS
ActionScript
728
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 18, 2009 May 18, 2009

Google "style metadata" or check the docs.

http://www.google.com/search?hl=en&q=Style+metadata&meta=&aq=f&oq=

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 18, 2009 May 18, 2009

Ok, that's interesting - I can't find it anywhere in Flash or AS3 docs, but it appears to be in Flex docs....

nice....

Now, if I can just figure out why it's there and what it's for...

...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 18, 2009 May 18, 2009

Ok, I get it - this is so the Flex compiler can recognize what's supplied by the class so you can use the class in MXML.

Haven't got there, yet - still banging my head against AS3 in Flash.  At least I know what it is, now...

Thanx,

rickb

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 18, 2009 May 18, 2009
LATEST

Hi,

this is style metadata, see the link

http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=metadata_141_14.html

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines