2 Replies Latest reply on Oct 4, 2006 5:00 AM by ljonny18

    passing variables

    ljonny18 Level 1

      I am using a :viewStack within an applicationControlBar to navigate between the different (seperate) MXML components that make up my Flex application....

      I am wondering how and what is the best method to pass variables across between the different pages (for example passing a selected product ID from one component and picking it up and using it on another etc....)

        • 1. Re: passing variables
          ntsiii Level 3
          Several options:
          * variables in the Application scope, referenced from components using Application.application.myVariable
          * A class with static properties
          * pass references to components into other components
          * use events

          • 2. Re: passing variables
            ljonny18 Level 1
            do you know of anywhere I can get an example to look at and try and work out how to do this? I have searched around but have had no joy......

            all I need to do is pass the ID of a selected row of a datagrid from one component and pick it up / use it in another.