Page 1 of 1

revlet serialization

Posted: Thu Oct 08, 2009 7:06 pm
by emmefisch
How can I save from my revlet several cards (with all objects) and reload this cards the next time?

Thanks for your help.

Posted: Thu Oct 08, 2009 11:34 pm
by Mark
Dear emmefisch,

I'm not sure that this is possible, because a revLet is essentially a standalone and data cannot be saved inside standalones.

In the standalone builder, you can set a permission to save data to a user's hard disk. This is probably the easiest way. Just save text from fields and buttons into one or more files on the user's hard disk and access these files the next time when the revLet loads.

Best,

Mark

Posted: Fri Oct 09, 2009 8:16 am
by emmefisch
Hi Mark

Thanks for your reply.

No, I want save the cards on the server. There will be thousends of cards and I think it will be better, to load only the 4-5 actual cards in the revlet. I think on database or XML or both. But I am not shure - is it possible to store the whole card seperatly in a file and reload ist after? That would be easyer...

Best,

Fredi

Posted: Fri Oct 09, 2009 9:13 am
by BvG
It's possible to go to stacks from a revlet. so you could have your cards in separate stacks on the server, or even assemble them by cgi server side scripting on the fly (not on-rev, as that can't do stacks yet).

Posted: Fri Oct 09, 2009 11:29 am
by emmefisch
It's possible to go to stacks from a revlet.
Sorry, I am a newbie, how I make this. Thanks.

Fredi

Posted: Fri Oct 09, 2009 11:42 am
by BvG
it's quite simple:

Code: Select all

go invisible stack URL ("http://yourdomain.ch/yourstack.rev")
copy card "templateCard" to stack "the current stack in the revlet"
look here for a tutorial on stack navigation (number 1):

http://www.runrev.com/developers/tutori ... nferences/

Posted: Fri Oct 09, 2009 12:16 pm
by emmefisch
Thanks, I will try it.

Best,
Fredi

Posted: Fri Oct 09, 2009 3:36 pm
by FourthWorld
What's on the cards?

If it's primarily text you may find a simple CGI storing text files for them may do what you need.

With images, you can set the fileName of an image object to a URL so you can store those on your server separately from the stack as well.