2 Replies Latest reply on Nov 28, 2008 5:15 AM by gallaharsha

    Error passing variable from popup

    gallaharsha Level 1
      Hi,
      I hava a problem using popup manager with title window. I get the following error:
      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      I am trying to create a popup which asks for credentials and then uses them in the main application window.
      The code is attached below...
        • 1. Re: Error passing variable from popup
          m_hartnett Level 3
          Glancing at the code it looks like there is a varible scope problem. Your code defines the pop window in the method displayPopUp ... var pop:LoginForm = LoginForm(PopUpManager.createPopUp(this,LoginForm,true));

          Since it is defined within the displayPopUp method with a variable name of pop, the variable is not available to anything outside of the method which means that the submitData method does not know about your pop variable.

          If you define your pop variable as an instance of the window all methods will have access to the variable.


          • 2. Re: Error passing variable from popup
            gallaharsha Level 1
            Thanks ,,got it..declared pop as private..
            probably sleeping when i wrote it...

            anyways thanks for your reply