revlet serialization
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
revlet serialization
How can I save from my revlet several cards (with all objects) and reload this cards the next time?
Thanks for your help.
Thanks for your help.
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
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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
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
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
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).
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
it's quite simple:
look here for a tutorial on stack navigation (number 1):
http://www.runrev.com/developers/tutori ... nferences/
Code: Select all
go invisible stack URL ("http://yourdomain.ch/yourstack.rev")
copy card "templateCard" to stack "the current stack in the revlet"
http://www.runrev.com/developers/tutori ... nferences/
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
- VIP Livecode Opensource Backer
- Posts: 10045
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
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.
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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn