1 Reply Latest reply on May 6, 2008 1:27 PM by rrhyne

    listener errors on window events

    rrhyne
      I have several event listeners on the the root window of my app: air.Event.DEACTIVATE, air.Event.ACTIVATE, air.Event.CLOSING. All invoked like this:

      window.nativeWindow.addEventListener(air.Event.DEACTIVATE, onDeactivate);

      They've worked fine across all the betas, but after I upgraded to 1.0, whenever I load a page in an IFRAME that is contained in the root window, any event that would trigger these listeners in my root window causes this error:

      "The application attempted to reference a JavaScript object in an HTML page that is no longer loaded."

      The object these listeners are referencing (my main window) should still be valid. They work fine before I load the page in the IFRAME, and the root hasn't changed. The only thing I've done is load an HTML page in my sandbox IFRAME, like this: document.getElementById('UI').src = page;

      What has changed in AIR 1.0 from beta 3 that could be causing this, and where can I find the list of ALL changes? I've searched all over the internet for AIR 1.0 Release notes and related search phrases and all I can find is Beta 3 release notes.

      I'd like to see Adobe provide an easy to access release history, which links to release notes and changes, preferably with an RSS feed. Is there a page I'm missing that does this?
        • 1. listener errors on window events
          rrhyne Level 1
          Ok, i've ripped the app apart, and found it wasn't the Listeners that were causing the errors. It was some sloppy code ( I'm as shocked as you are :D ) that had my root attempting to reference an object from the childSandboxBridge that was no longer in the sandbox. My bad.

          It seems though that there was a change to the AIR API from b3 to v1 relating to how javascript objects persist. My old bridged functions that used to persist when the sandbox loaded another page, are suddenly not available when the original page was loaded again. Again, sloppy coding practices for me to rely on those items persisting. I'm restructuring the whole app to better fit the sandbox.

          Again, though....is there a release notes page for b3 to v1?