0

this.persist issue

i have two questions related to this.persist data store.

my widget has differents views that use the this.persist data loaded from a previous view.
the problem appears when selecting the home button. the default view gets on top but its persistent storage is empty. if i just try to get to the same view using the back button, this problem doesn't show. Is this normal behaviour?


another issue is extrange. Starting on a view with persistent data, i load other view using loadView and parameters related to the persistent data. Then, at the new view, i add some data to the object that were pass through. if i print that info, it is well change but printing the previous view persistent data shows no change.But if i try it once again, it works well, the new data has been added. any idea why?

thanks!!

1 Reply
  • QUOTE (pabloch87 @ Aug 12 2010, 11:00 AM) <{POST_SNAPBACK}>
    my widget has differents views that use the this.persist data loaded from a previous view.
    the problem appears when selecting the home button. the default view gets on top but its persistent storage is empty. if i just try to get to the same view using the back button, this problem doesn't show. Is this normal behaviour?


    You will only get your persist object when you use the back button. This is normal behavior. In general, your home view should not be expecting a persist object, or at least have defaults for when it does not get loaded from the back button.

    QUOTE (pabloch87 @ Aug 12 2010, 11:00 AM) <{POST_SNAPBACK}>
    another issue is extrange. Starting on a view with persistent data, i load other view using loadView and parameters related to the persistent data. Then, at the new view, i add some data to the object that were pass through. if i print that info, it is well change but printing the previous view persistent data shows no change.But if i try it once again, it works well, the new data has been added. any idea why?


    I don't quite understand what is happening here. Are you trying to send this.persist in as a parameter in loadView? Can you please give us a list of actions that you are trying?
    0

Recent Posts

in Getting Started / Beginners - Yahoo! TV Widgets