Page 1 of 1

I may have screwed up

Posted: Fri Apr 17, 2009 7:25 pm
by magice
I have come to a point in my app where it will no longer let me edit my stack script. When I try it gives me an error saying "Can't set script while it is executing" This is a new error to me, but I suspect that it is the result of some sort of recursive loop. If it means what I think, then the program is constantly executing. Is there a way to interupt execution so I can edit the file, or does this mean I have to go back to an earlier saved version?

Posted: Fri Apr 17, 2009 7:50 pm
by malte
Hi magice,

are you on Win or Mac. On a mac apple + "." usually aborts a script.

Do you get into that state after closing rev and reopening the stack? If so try locking messages before you open your stack. Click it in the toolbar or type
lock messages

into the messagebox. Make sure to unlock messages after your stack is loaded.

Hope that helps,

Malte

Posted: Fri Apr 17, 2009 8:46 pm
by magice
Thank you, what I very stupidly did was use the openCard command to initiate a stack that is locked with the modal command. The window then makes itself invisible. The problem is it would run for every card that opened so after i made it invisible again, it was running in the background called up by the next card. I just needed to use the application browser to call it up again and close it 4 more times then it let me edit it. Important lesson here. If you use the openCard command and only want the script to run once, put it in an if structure that closes itself off from running a second time. :?

Posted: Fri Apr 17, 2009 9:56 pm
by massung
Hehe, I had something similar a while ago. I wanted my app to quit when the user closed the card and I did:

Code: Select all

on closeCard
  quit
end closeCard
Which worked wonderfully. Later on I added another card and a script to switch to it on startup. Fun times. Took me a while to suddenly realize what was going on and how to fix it. ;)

Jeff M.