Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of 'fb:purpose' in a Flex <fx:Script>?

I've now seen it a few times here and there and it's got me curious.

 <fx:Script fb:purpose="styling">
    //script stuff
 </fx:Script>

So far, I have seen no difference with it there and without it. Nor do I get any compiler erros. How does a script with fb:purpse differ from a script without? What are the consequences for not including a fb:purpose and what are the benefits for including a fb:purpose?

like image 574
Jonathan Dumaine Avatar asked Dec 03 '10 03:12

Jonathan Dumaine


Video Answer


1 Answers

From the Flex 4 documentation:

Most Spark skins have a special block at the top of the skin class. This block typically defines style properties that the skin class respects, including the exclusions that the skin uses. The tag includes a special attribute, fb:purpose="styling":

<fx:Script fb:purpose="styling">

This attribute is used by Flash Builder. When you create a copy of a skin class in Flash Builder, you can opt to make the skin styleable. If you choose to make it styleable, Flash Builder includes this section of the skin class. If you choose not to make the skin styleable, Flash Builder excludes this section.

like image 165
Yaba Avatar answered Sep 18 '22 08:09

Yaba