Friday, October 8, 2010

Flex 4 difference between property and class

Source
Now, how do you know, regardless of the defnition style, which is a property
and which is a class?




   1:  <s:Group>
   2:    <s:layout>
   3:     <s:VerticalLayout/>
   4:    </s:layout>
   5:    <s:Button label="1"/>
   6:    <s:Button label="2"/>
   7:    <s:Button>
   8:     <s:label>3</s:label>
   9:    </s:Button>
  10:  </s:Group>

The G in the <s: Group> tag is uppercase, so it refers to an instance of a Flex class named  Group. The l in the <s:layout> tag is lowercase, so it is a property of the Group. The V in the  <s:VerticalLayout> tag is uppercase, so it is referring to a new instance of a Flex class named  VerticalLayout.

No comments:

Blog Archive