Josep wrote:
Hello Jaqueline,

Local at stack level? Where I must define it? I don't see...

A script local variable is like a global variable but it only applies to a single script. If you declare a script local at the top of the script, any handler in the same script can use it. Handlers in other scripts can't see it.

If your Search button has its own script and your option button has a different script, then you can't use a script local variable. You'd need a global. But if both buttons call handlers located in the stack, for example, then both stack handlers can use a script local variable that is located in the stack script.

To declare a script local variable, you just declare it at the top of the script, before any other handlers -- or at least before any handlers that use it. Most people put them at the top. This is the same place constants go.

For a script local that stores the option menu choice, you can do something like this:

local sMenuChoice -- this goes at the top of the script

on markOption pMenuChoice -- option_button calls this
 put pMenuChoice into sMenuChoice -- store it in the script local
 -- set checkmark here if you want
end markOption

on search -- search button calls this
 put sMenuChoice into tSearchTerm
 -- etc
end search

--
Jacqueline Landman Gay         |     [email protected]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to