1 (edited by wlovin 2011-04-12 05:23:03)

Topic: Trying to understand persistance...

Somebody please tell me if I have this right: As a channel plays sequentially loading app after app, each app is reinstantiated each time it is appears. So, if my app opens a socket and gets some XML it has to do that every time it loads... On the other hand, an app that is re-sized is not reinstantiated - just a simple onResize event occurs...

What I'd like to do is to have the user interact with my widget and have the interactive state stored from instantiation to instantiation. The Sony documentation (sorry, I've got a Dash and I know it's "odd") indicates that there is a _root._chumby_widget_state property that can be set and read from instantiation to instantiation. None of the Chumby documentation alludes to this property. Would anyone know if this property exists?

I know that _chumby_set_widget_parameters will allow me to persist over reboots because it is uploaded to the server. But that's not necessary here (might be nice) ...

So, to rephrase, is there a down and dirty way to persist from instantiation to instantiation without hitting the Chumby servers? The only link I can find mentions Flash player's SharedObject class, but there's not much info on that in the Chumby.. Thx wlovin

Re: Trying to understand persistance...

I wrote this once upon a time: Data Persistance.  Adobe restuctured all their documentation so the links are broken, but you should be able to find them with a web search.

If the amount of data/state you want to save is small, the SharedObject sounds like your best best.  If it is larger, you'll want to save state and restore via Chumby services.  Somewhere in the forums the size limits of SharedObjects was listed; sorry, you'll have to search for it.

Good luck and have fun,

wayn3w

Re: Trying to understand persistance...

Right - I'd stumbled upon that - very helpful. As you say the links didn't work but I think I'm headed in the right direction...

Re: Trying to understand persistance...

So what I ended up doing was just persisting to my own server using LoadVars()... Quick, clean, and works a treat...