Test Variable?
Phil Davis
davis.phil at comcast.net
Fri Feb 10 18:37:44 EST 2006
Hi Garrett,
When you declare a global within a handler, the data that goes into it
will stay there, but no other handler can access it - the place where
you declare a variable determines its scope. Put the "global" statement
at the top of your script, outside of all handlers; then all handlers in
that script can access it.
If your 'openField' handler is in a different script (like of a field),
then that script will also need to contain a "global varCmdLineParamIn"
statement for the var to be accessible there.
Phil Davis
Garrett Hylltun wrote:
> I'm getting an error in this code:
>
> on openField
> if varCmdLineParamIn is not empty then
> put varCmdLineParamIn into varFilePathCurrent
> [snip]
> end if
> end openField
>
>
> Type: Expression: unquoted literal
> Object: FieldEditor
> Line: if varCmdLineParamIn is not empty then
>
> In my "on openStack" I do declare the variable as "global
> varCmdLineParamIn"
>
> I have no clue what is wrong or how to fix. Anyone able to give me
> some help on this?
>
> Thanks,
> -Garrett
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list