Re: Problem with declaring local variables

2006-06-10 Thread Rob Cozens
Hi Erik, there is absolutely nothing to be gained by declaring a handler local variable unless one uses explicitVariables. you can set the order in which they appear in VW. you can see at a glance what to look for. I'm not seeing that here: on mouseUp local xValue local

Re: Problem with declaring local variables

2006-06-10 Thread FlexibleLearning
there is absolutely nothing to be gained by declaring a handler local variable unless one uses explicitVariables. Not entirely. Decalring a variable is a simple way of initialising it, to empty unless defined. This can be truly helpful when returning values (in it or in the result), as

Re: Problem with declaring local variables

2006-06-09 Thread Erik Hansen
--- Rob Cozens [EMAIL PROTECTED] wrote: there is absolutely nothing to be gained by declaring a handler local variable unless one uses explicitVariables. you can set the order in which they appear in VW. you can see at a glance what to look for. Erik Hansen [EMAIL PROTECTED]

Re: Problem with declaring local variables

2006-06-08 Thread Rob Cozens
Hi Peter, If a variable is not declared outside a handler, it is assumed to be a handler local variable and reinitialized every time the handler is called. I stand corrected... though in that case there is absolutely nothing to be gained by declaring a handler local variable unless one

Re: Problem with declaring local variables

2006-06-07 Thread Malte Brill
Hi! Have you accidently checked variable checking in the preferences- Script editor? All the best, Malte ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription

Re: Problem with declaring local variables

2006-06-07 Thread Peter T. Evensen
Also make sure you're not using put with a custom property. I had: put someting into the cpCustomProperty of card Some Card and I would get the cannot create variable error. FINALLY I realized I needed to use set with a custom property: set the cpCustomProperty of card Some Card to

Re: Problem with declaring local variables

2006-06-07 Thread Rob Cozens
Hi Steve, Until now I've had the impression that global variables need to be declared, whereas local variables do not. That depends on whether one wants the value of the local variable to persist during runtime: * An undeclared local variable is initialized to empty every time the

Re: Problem with declaring local variables

2006-06-07 Thread Peter T. Evensen
On your second point, do you mean a declared local variable OUTSIDE a handler?I think you are confusing a declared local variable INSIDE a handler with one that is declared OUTSIDE a handler. I don't believe one declare INSIDE a script retains its value: local sRetainsValue = 0 on AddOne

Re: Problem with declaring local variables

2006-06-07 Thread Stephen Barncard
If you are using Constellation - check the checkbox Check Vars at the top of the editor window - I didn't know that was there and also it doesn't sync with the IDE checkbox. This one drove me crazy for weeks. Somehow the checkbox in the Constellation window got set and... I made a fool of

Re: Problem with declaring local variables

2006-06-07 Thread Jim Ault
On 6/7/06 8:00 AM, Peter T. Evensen [EMAIL PROTECTED] wrote: On your second point, do you mean a declared local variable OUTSIDE a handler?I think you are confusing a declared local variable INSIDE a handler with one that is declared OUTSIDE a handler. I don't believe one declare INSIDE

Problem with declaring local variables

2006-06-07 Thread Stgoldberg
Yes, Malte. You are absolutely right. By unchecking variable checking in the preferences, the scripting no longer requires me to declare local variables before using them. Thanks! Steve Goldberg In a message dated 6/7/06 2:20:12 PM, [EMAIL PROTECTED] writes: Have you accidently checked