defaultStack and front scripts
Posted: Fri Apr 16, 2010 12:38 am
My .rev file contains a script that is inserted as a front script at startup. I'm now wanting to break out the stack/card that contains that script into a separate .rev file so I can us it from any other Rev applications.
I split them out to a new .rev file and built a test app that does the insert command to put the scripts into it as front scripts - all seemed to work fine.
The first handler I want to call from the front script checks to see if a certain stack exists in the test .rev file and if not, creates it and adds one card to it. This is done with an "if exists(stack "xyz")" test. What I'm finding is that the check is looking for the stack in the .rev file that holds my code library and creating the stack in that .rev file instead of in the .rev file for my test app. Also when a create he card (with the create card command), it goes into the stack that holds the card with the code library handlers in it.
I've tried setting the defaultStack property but according to the dictionary, that holds what looks like the abbrev name of a stack so it still seems to look in the code library.rev file.
How can I make the exists test look in the test .rev file, not the code library .rev file, and create the stack/card in my app file rather than the code library .rev file?
Also, when I start to distribute this thing as a standalone app, will I have to distribute the .rev file for the code library as well as the .rev file for the app, or is there some way to handle that during the build of the standalone app.
Thanks,
Pete
I split them out to a new .rev file and built a test app that does the insert command to put the scripts into it as front scripts - all seemed to work fine.
The first handler I want to call from the front script checks to see if a certain stack exists in the test .rev file and if not, creates it and adds one card to it. This is done with an "if exists(stack "xyz")" test. What I'm finding is that the check is looking for the stack in the .rev file that holds my code library and creating the stack in that .rev file instead of in the .rev file for my test app. Also when a create he card (with the create card command), it goes into the stack that holds the card with the code library handlers in it.
I've tried setting the defaultStack property but according to the dictionary, that holds what looks like the abbrev name of a stack so it still seems to look in the code library.rev file.
How can I make the exists test look in the test .rev file, not the code library .rev file, and create the stack/card in my app file rather than the code library .rev file?
Also, when I start to distribute this thing as a standalone app, will I have to distribute the .rev file for the code library as well as the .rev file for the app, or is there some way to handle that during the build of the standalone app.
Thanks,
Pete