• Tutorials
  • Blog
  • About
  • Contact
  • Getting the View Navigator Change Event

    2012 - 02.20

    Maybe you’re googling to find the Flex View Navigator change event? I know I was but I didn’t find it. Here’s the quick fix:

    You can watch for the length to change like this:
    ChangeWatcher.watch(mainNavigator,’length’, mainNavigator_lengthChangeHandler, false, true);
    Take note that we’re using weak reference here.

    Another option that I’m leaning towards is responding to the view navigator’s elementAdd and elementRemove events.
    ViewNavigator id=”mainNavigator”
    firstView=”view.homeScreen.HomeScreenView”
    elementAdd=”mainNavigator_elementAddHandler(event)”
    elementRemove=”mainNavigator_elementAddHandler(event)”

    Some of these blog posts are just so I can find the answer to the same problem later. But I hope they help someone else also :)

    Best of luck,
    Matt

    One Response to “Getting the View Navigator Change Event”

    1. Hicham Taoufikallah says:

      Hi,
      Thank u very much it worked :)

    Your Reply