On 6/22/06 10:15 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> My beef with IT is that IT isn't defined as a global variable by default. For
> example, if you need a quick file path and type ...
>     answer file ""
> ... you can't get your path unless you previously did this ...
>     global it
> In HC that was done by default which I found to be very handy. And that is
> all I have to say about IT.

I don't remember 'it' as being global by default in HCard.

The downside for using 'it' as a global is that any handler in any stack or
message path could affect that value.  In particular,
 the value of 'global it' is set in your handler,
then you navigate to another card,
and thus you may have triggered 'on closecard', 'on opencard', 'on
openstack', etc.

Of course, 'it' will be a local only, unless the script or handler declares
 global it
so any scripts you do not control will not regard 'it' as a global, such as
library front/back scripts, plugins.

Try card script = global it, get "huckleberry"
then have the stack script use 'it' as normal, 'it' = empty

This is normal variable scoping in Rev, and I think HCard.



Jim Ault
Las Vegas


_______________________________________________
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