Some Basic Misunderstandings/Problems with RunRev - aka Help!

Dan Friedman dan at clearvisiontech.com
Tue Apr 13 17:48:47 EDT 2004


Dave,

I'm not a Revolution "pro", but hope this helps...
 
> 1 (& 2).  How do I get the Quit and Preferences Menu Items to work
> correctly on MacOS Classic and X?

It took me a while to figure this one out... but, here's what works for me.
Put this in the stack script of your main stack (of course change
"someStack" to your stack's name):

on appleEvent aeClass,aeID
  if aeClass & aeID = "aevtpref" then
    send "menuPick" && "Preferences..." to btn "Edit" of stack "someStack"
  else if aeClass & aeID = "aevtquit" then
    send "menuPick" && "Quit" to btn "File" of stack "someStack"
  end if
end appleEvent

> 3.  I am confused as to when RunRev saves Stack/Card Data. For
> instance in a simple Stack with one Card that has one Checkbox and OK
> and Cancel buttons. On the OK button I have the following Script:
> 
> on mouseUp
> save this stack
> close this stack
> end mouseUp

If it's a standalone, it won't save.

> and on the Cancel Button:
> 
> on mouseUp
> close this stack
> end mouseUp

This of course, will work in a standalone.

> If I then make a standalone (with the CheckBox initially unchecked)
> and then run it and then click the checkbox so it's checked and press
> OK, when I next load the Stack, should the Checkbox be on or off?

It will be off.  In a standalone, this won't work -- you can't save a stack
that is a standalone - period.  But, you can:

(1) save and load the state of a checkbox (or other controls) - this is my
personal preference.
(2) have your standalone open a stack file.  Now it can be saved.

Hope that helps.



More information about the use-livecode mailing list