Resetting stack while debugging "on open" scripts
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Resetting stack while debugging "on open" scripts
Hope this isn't misplaced or an RTFM question from a newbie - I am debugging scripts that execute on card and stack opening - is there a way in the IDE to recycle the script in memory to trigger the "on open" scripts without going through a Compile/Save/Close/Remove from memory/Open Recent cycle each time?
Thanks,
Thanks,
Walt Brown
Omnis traductor traditor
Omnis traductor traditor
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Walt,
welcome to the forum, very little RTFM going on around here, everybody remembers too well how it was to start. Though no one objects to reading the manuals either..
But feel free to ask if you get stuck, even on 'simple' things.
get the message box by issuing a "command m" (mac) or control m (windows) or go to the tools menu and choose message box.
Then try to type into the message box: opencard or openstack (or whatever handler/command you want to invoke)
The message box sends the command to the stack and the stack executes the handlers. In the case of openstack and opencard without actually opening a stack or a card. It is just like sending a comand like mouseUp to a button.
no need to close a stack and reopen it.
The message hierarchy in the user guide pdf explains this concept very well and it is easier to understand a good many things in Rev if you have a basic idea of what the message hierarchy is.
regards
Bernd
welcome to the forum, very little RTFM going on around here, everybody remembers too well how it was to start. Though no one objects to reading the manuals either..
But feel free to ask if you get stuck, even on 'simple' things.
get the message box by issuing a "command m" (mac) or control m (windows) or go to the tools menu and choose message box.
Then try to type into the message box: opencard or openstack (or whatever handler/command you want to invoke)
The message box sends the command to the stack and the stack executes the handlers. In the case of openstack and opencard without actually opening a stack or a card. It is just like sending a comand like mouseUp to a button.
no need to close a stack and reopen it.
The message hierarchy in the user guide pdf explains this concept very well and it is easier to understand a good many things in Rev if you have a basic idea of what the message hierarchy is.
regards
Bernd
Thanks Bernd, somehow I missed that in the brief documentation.
Neat! A list of the available system globals in there as well!
I have dusted off my Danny Goodman "The Complete Hypercard" book, maybe I'll need to symbolically burn it to get rid of old assumptions. Now if I could only find a machine with a working 400k diskette drive, I'd have my code base back. Or maybe that's not a good thing.
BR,
Walt
Neat! A list of the available system globals in there as well!
I have dusted off my Danny Goodman "The Complete Hypercard" book, maybe I'll need to symbolically burn it to get rid of old assumptions. Now if I could only find a machine with a working 400k diskette drive, I'd have my code base back. Or maybe that's not a good thing.
BR,
Walt
Walt Brown
Omnis traductor traditor
Omnis traductor traditor
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Keep it handy - there are some gems in there.WaltBrown wrote:I have dusted off my Danny Goodman "The Complete Hypercard" book, maybe I'll need to symbolically burn it to get rid of old assumptions.
But while you're getting started with Rev treat yourself to this great resource:
http://www.hyperactivesw.com/mctutorial ... altoc.html
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
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Walt- Welcome to Revolution. It's almost better to start from scratch and not think HyperCard. In particular forget what you think you know about backgrounds - Revolution has a different and richer pardigm for these things. And for your debugging open and close handlers -as nonintuitive as it seems, the openStack, openCard sort of things should go in the script of the first card rather than in the stack script. Those messages are sent to the first card in the stack anyway, and it will keep you out of trouble later on - you don't necessarily want substacks firing the openStack handlers in their parent stack by accident.
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Richard's being a bit modest here, too - check out www.revjournal.com and his own fourthworld.com for some more wonderful resources.
A further caveat for anyone coming from a HyperCard background: if you create a standalone app you can't modify it on the fly. This is an OS thing, not a rev thing. In HyperCard you're running the HC interpreter and executing your stack as a document, so you can save data into card fields and expect it to be there the next time you run the app. In Revolution if you create a standalone application you can't save changes. You have to save data to separate files: text files or other stack files or a database, but something other than your main stack. This is a hard one to get used to coming from HyperCard - everyone goes through a real shift in thinking when they come up against this.
A further caveat for anyone coming from a HyperCard background: if you create a standalone app you can't modify it on the fly. This is an OS thing, not a rev thing. In HyperCard you're running the HC interpreter and executing your stack as a document, so you can save data into card fields and expect it to be there the next time you run the app. In Revolution if you create a standalone application you can't save changes. You have to save data to separate files: text files or other stack files or a database, but something other than your main stack. This is a hard one to get used to coming from HyperCard - everyone goes through a real shift in thinking when they come up against this.