2 Replies Latest reply on Nov 24, 2007 1:42 PM by goingflex

    Custom History Manager

      I am creating a custom history manager using the IHistoryManagerClient interface. I call HistoryManager to initialize, register and save. The back button gets enabled and when I click it I get:

      Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: mx.managers.InitLocalConnection was unable to invoke callback loadInitialState. error=TypeError: Error #1009: Cannot access a property or method of a null object reference.

      Has anyone had a similar experience or relevant information.
        • 1. Custom History Manager
          Yes, I get the same thing when I navigate to a state that has a TabNavigator, press the back button (works OK), then nav to the state w/ the TabNavigator (either by the browser forward button or a nav button from the app), and then BACK again using the browser back button. The HistoryManager then throws here:

          in HistoryManagerImpl around line 748:

          // Call loadState() on all registered objects.
          var n:int = registeredObjects.length;
          for (var i:int = 0; i < n; i++)
          var registeredObject:IHistoryManagerClient = registeredObjects ;
          crc = getRegistrationInfo(registeredObject).crc;

          delete params[crc];

          because while it once had two resgistered objects (my app and the TabNav), it now has one - and i=1 when now registerObjects.length = 1. Ouch! i needs to be 0.

          • 2. Re: Custom History Manager
            Hi Jason
            I have the same problem but this crc thing doesn't work. Can you put in code explanation that I can use please. What is the exact code and where does it go please?
            What is crc? What is registeredObjects?