locked
Unloading a Page (ListView and custom Render function) RRS feed

  • Question

  • Hey,

    I'm trying to get a ListView with a multistage render function (like in the sample) working. The basics seem to work well enough, however the problem I have is that whenever I navigate back before all the Items are rendered, the renderer throws an exception (Unable to set property 'innerText' of undefined or null reference - fair enough as the element no longer exists).

    How do I handle this type of unloading of a page?

    Thanks for any help,

    Censored

    Saturday, June 30, 2012 2:05 PM

Answers

  • I do not think there is any good way to communicate to the render function if you are in the process of rendering the page.  How about you put a try catch block around the processing and exit processing if you get this error?

    -Jeff


    Jeff Sanders (MSFT)

    Monday, July 2, 2012 2:50 PM
    Moderator

All replies

  • I do not think there is any good way to communicate to the render function if you are in the process of rendering the page.  How about you put a try catch block around the processing and exit processing if you get this error?

    -Jeff


    Jeff Sanders (MSFT)

    Monday, July 2, 2012 2:50 PM
    Moderator
  • Hi Jeff,

    this seems to work for the render function. However I have now run into another issue that seems to persist across all apps that use the sample navigator.

    When I navigate to a new page (with the navigator.navigate function) and then back very quickly (I used a macro) the app crashes to the terminate app handler and gives me no exception. This happens every time and even with just a basic new Project Grid App. 
    So basically is there any way to know what is causing this crash?

    Thanks,

    Censored

    Monday, July 2, 2012 4:29 PM