openstack 101

Chipp Walters chipp at chipp.com
Wed Jul 20 01:12:04 EDT 2005


Mark,

Here's what I would do:

First, I would put an 'on OpenStack' handler in the first card script of 
the stack.


then save it, close Rev, open Rev, choose the browse tool, and open your 
stack. See if the debugger gets called. If not, then I would suspect 
there's an openStack handler in a frontScript somewhere which isn't 
getting passed.

I have a standalone 'shell' which I use. It consists of a small stack 
with a single button named "Launch It" with the script:

on mouseUp
   if there is a file "config.txt" then
     put URL ("file:config.txt") into tStackPathToOpen
   else
     answer file "Choose a Stack to Open"
     if it is empty then exit to top
     put it into tStackPathToOpen
     put tStackPathToOpen into URL ("file:config.txt")
   end if
   go stack tStackPathToOpen
end mouseUp

Then there's this in the stack's *CARD* script:

on closeStack
   if the environment is not "development" then
     quit
   else
     close this stack
   end if
end closeStack

I make this into a standalone, and I can use it to 'test' outside the IDE.

best,

Chipp



Mark Swindell wrote:
> Ok, I'm feeling pretty dumb, but why doesn't my openstack handler  
> execute when my stack opens?  What am I not getting?  (I type  openstack 
> into the messagebox after opening and all is well, but the  handler 
> doesn't execute when opening my stack from scratch.)



More information about the use-livecode mailing list