11 Replies Latest reply on Dec 13, 2010 9:32 AM by BosDog

    problem referencing parentDocument variables

    BosDog Level 1

      i have a main.mxml file that has a popup window. i can reference the variables in the main.mxml easily by using parentApplication.[variable_name_here]

       

      however... in my popup component called SelectAccount.mxml i have yet another popup window (using the popupmanager). when i am this 3rd window (2 levels from the main.mxml parentApplication)... i want to reference a variable in 1 level up in the SelectAccount.mxml. but when i reference parentDocument.[variable_name_here] or even parentApplication.[variable_name_here] Flex is always looking at the main.mxml file (the very top level).

       

      how can i reference the middle level that actually generated the 3rd window popup?

       

      here is the code i use to generate the popup on SelectAccount.mxml:

       

      private function filterAccts():void

      {

       

       

      var win:FilterAccts = PopUpManager.createPopUp(this, FilterAccts, true) as FilterAccts;

      PopUpManager.centerPopUp(win);

      win.initComponent();

      }