1 Reply Latest reply on Dec 31, 2010 12:59 PM by Gregory Lafrance

    pageTitle changes to localhost url, then to #

    Gregory Lafrance Level 6

      In my previous applications, the pageTitle value in the Application properties always worked correctly.

       

      In my most recent application, which uses a TabNavigator, it is not working.

       

      The pageTitle shows correctly for second or two, then it shows my localhost web address, the eventually flips to “#”.

       

      Any ideas how to correct this?

        • 1. Re: pageTitle changes to localhost url, then to #
          Gregory Lafrance Level 6

          This code seems to be a workaround, but still not sure why TabNavigator has to mess with the page title. Setting the Application pageTitle property does not prevent TabNavigator from changing it.

           

          <?xml version="1.0"?>
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
            creationComplete="init();">
            <mx:Script>
              <![CDATA[
                import mx.managers.IBrowserManager;
                import mx.managers.BrowserManager;
                private var bm:IBrowserManager;
                [Bindable] private var appTitle:String = "My Application Title";
                
                private function init():void{
                  bm = BrowserManager.getInstance();
                  bm.setTitle(appTitle);
                }
              ]]>
            </mx:Script>
              <mx:TabNavigator borderStyle="solid" change="bm.setTitle(appTitle)">
                  <mx:VBox label="Accounts" width="300" height="150"/>
                  <mx:VBox label="Stocks" width="300" height="150"/>
                  <mx:VBox label="Futures" width="300" height="150"/>
              </mx:TabNavigator>
          </mx:Application>