0 Replies Latest reply on Mar 28, 2008 11:05 AM by binkerboy

    Set Label property in Viewstack

    binkerboy Level 1
      Hello, all.

      I have one main application page (CMDBDash.mxml) with a Viewstack that points to other pages. There is a Login.mxml page which is the default for the Viewstack (ID: Views). On this page is label called lblLogonErrorMessage, with visible set to "false" and a form with Alias and Password. When the user enters these values and hits submit, they are allowed to see more of the application via a function call. This works fine.

      I wanted to add a notification label to let them know when the don't login correctly. The login function checks to see if the logged in correctly. This function is in the CMDBDash.mxml file. If they don't login, I want to set the lblLogonErrorMessage visible property to "true" so they are told they need to try again. I tried this:

      public function login():void
      {
      if they authenticate, do this

      else

      //The did not get it, so do this
      Views.Login.lblLogonErrorMessage.visible = true;

      }

      I get an error when I try to compile.

      1119: Access of possibly undefined property login through a reference with static type mx.containers:ViewStack.

      Is there a way to control the properties of other objects in other pages? What am I missing?

      Gary