0 Replies Latest reply on May 9, 2011 12:46 PM by Kristin95762

    Passing variable values between windows (AIR, sqlite)

    Kristin95762 Level 1



      I have a main app, a custom component, and a class file.


      In the main app I have this code:


      private function authorGrid_doubleClickHandler(event:MouseEvent):void


      popup = new BookDetailsWindow();

      popup.addEventListener(Event.CLOSE, closeBookDetailsHandler);

      popup.addEventListener("readBooksDetail", readBookDetailsHandler);

      popup.addEventListener("cancel", closeBookDetailsHandler);

      PopUpManager.addPopUp(popup, this, true);

      popup.title = (authorGrid.selectedItem as Object).title;

      popup.bookTitleTxt.text = authorGrid.selectedItem.title;

      bdSelectedBook = authorGrid.selectedItem.title;






      Currently, I am passing a value to the popup via the popup.bookTitleTxt.text = authorGrid.selectedItem.title;

      I use the bookTitleTxt.text value in a parameter for a query in the actionscript file for the popup custom component.

      This works the way it should but what I would rather do is use something like

      bdSelectedBook = authorGrid.selectedItem.title; so I can pass this value to a SELECT statement in the custom component.


      How do I set up variable sharing? I have the same variable defined in all three files, declared as public, but it returns null.


      Thanks alot for your help.