4 Replies Latest reply on Nov 4, 2011 11:06 AM by Rick.Blacker

    New user, question about <fx:Declarations> block

    Rick.Blacker

      Hi all.

      Not new to developing software, but new to the Adobe tools.  Learning how to write Flex apps using Flash Builder 4.5.  Currently working through the book "Adobe Flex 4.5 Training from the Source".  I'm in chapter 14. The book has you create a new value object called OrderInfo which is used by a mxml component called CheckoutView. 

       

      Then the book has you create an instance of the OrderInfo object in the declarations block stating,

      You now have an instance of the OrderInfo class that can be populated by the view to which it is passed.

       

      Why do you have to put it in the declarations block rather that create it in a script block and allow other components to access it that way?

       

      Thanks in advance for any help!

      Rick