Weird variable thing in 8.1.5

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Weird variable thing in 8.1.5

Mark Wieder via use-livecode
I just created a button with this script:

On mouseup
  Put "test" into tTest
End mouseUp

It would not compile, producing the following error:

Compilation error at line 2 (Chunk: can't create a variable with that name (explicitVariables?)) near "tTest", char 15

Why would this happen?

Nobody would ever be able to use 8.1.5 if that always happened, so what would make it happen now?

Sent from my iPhone
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weird variable thing in 8.1.5

Mark Wieder via use-livecode
Hi Jonathan,

This is because you have enabled Strict Compilation Mode. To fix that error:

1) add "local tTest" before "Put "test" into tTest"

OR

2) Disable strict compilation (LC Preferences -> Script Editor -> Strict
Compilation Mode)

Best,
Panos
--

On Sun, Jul 16, 2017 at 4:06 PM, Jonathan Lynch via use-livecode <
[hidden email]> wrote:

> I just created a button with this script:
>
> On mouseup
>   Put "test" into tTest
> End mouseUp
>
> It would not compile, producing the following error:
>
> Compilation error at line 2 (Chunk: can't create a variable with that name
> (explicitVariables?)) near "tTest", char 15
>
> Why would this happen?
>
> Nobody would ever be able to use 8.1.5 if that always happened, so what
> would make it happen now?
>
> Sent from my iPhone
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weird variable thing in 8.1.5

Mark Wieder via use-livecode
Thanks Panos

It is amazing how many options LC has. :)



Sent from my iPhone

> On Jul 16, 2017, at 11:14 AM, panagiotis merakos via use-livecode <[hidden email]> wrote:
>
> Hi Jonathan,
>
> This is because you have enabled Strict Compilation Mode. To fix that error:
>
> 1) add "local tTest" before "Put "test" into tTest"
>
> OR
>
> 2) Disable strict compilation (LC Preferences -> Script Editor -> Strict
> Compilation Mode)
>
> Best,
> Panos
> --
>
> On Sun, Jul 16, 2017 at 4:06 PM, Jonathan Lynch via use-livecode <
> [hidden email]> wrote:
>
>> I just created a button with this script:
>>
>> On mouseup
>>  Put "test" into tTest
>> End mouseUp
>>
>> It would not compile, producing the following error:
>>
>> Compilation error at line 2 (Chunk: can't create a variable with that name
>> (explicitVariables?)) near "tTest", char 15
>>
>> Why would this happen?
>>
>> Nobody would ever be able to use 8.1.5 if that always happened, so what
>> would make it happen now?
>>
>> Sent from my iPhone
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Weird variable thing in 8.1.5

Mark Wieder via use-livecode
In reply to this post by Mark Wieder via use-livecode
Check in your script editor window under the Edit Sub-menu and look to see
if "variable checking" is checked. That means that you need to declare any
variables before you can use them. If you uncheck this, LiveCode will not
require you to declare variables.
Some people don't use variable checking and other do. That is a personal
preference. Look up variable checking in the manual and you can decide what
to do.

Sincerely,

Clarence Martin
Email: [hidden email]
Cell: 626 6965561

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf
Of Jonathan Lynch via use-livecode
Sent: Sunday, July 16, 2017 8:07 AM
To: [hidden email]
Cc: [hidden email]
Subject: Weird variable thing in 8.1.5

I just created a button with this script:

On mouseup
  Put "test" into tTest
End mouseUp

It would not compile, producing the following error:

Compilation error at line 2 (Chunk: can't create a variable with that name
(explicitVariables?)) near "tTest", char 15

Why would this happen?

Nobody would ever be able to use 8.1.5 if that always happened, so what
would make it happen now?

Sent from my iPhone
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weird variable thing in 8.1.5

Mark Wieder via use-livecode
That was it - must have gotten clicked by accident.

In 14 years with LC I have never used that option.



Sent from my iPhone

> On Jul 16, 2017, at 1:43 PM, ** Clarence P Martin ** via use-livecode <[hidden email]> wrote:
>
> Check in your script editor window under the Edit Sub-menu and look to see
> if "variable checking" is checked. That means that you need to declare any
> variables before you can use them. If you uncheck this, LiveCode will not
> require you to declare variables.
> Some people don't use variable checking and other do. That is a personal
> preference. Look up variable checking in the manual and you can decide what
> to do.
>
> Sincerely,
>
> Clarence Martin
> Email: [hidden email]
> Cell: 626 6965561
>
> -----Original Message-----
> From: use-livecode [mailto:[hidden email]] On Behalf
> Of Jonathan Lynch via use-livecode
> Sent: Sunday, July 16, 2017 8:07 AM
> To: [hidden email]
> Cc: [hidden email]
> Subject: Weird variable thing in 8.1.5
>
> I just created a button with this script:
>
> On mouseup
>  Put "test" into tTest
> End mouseUp
>
> It would not compile, producing the following error:
>
> Compilation error at line 2 (Chunk: can't create a variable with that name
> (explicitVariables?)) near "tTest", char 15
>
> Why would this happen?
>
> Nobody would ever be able to use 8.1.5 if that always happened, so what
> would make it happen now?
>
> Sent from my iPhone
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weird variable thing in 8.1.5

Mark Wieder via use-livecode


On 16/07/2017 18:49, Jonathan Lynch via use-livecode wrote:
>
> In 14 years with LC I have never used that option.
>
>
You should try it :-)

Can be a bit of a pain to add all the local variable declarations - BUT
every so often it will help you discover a typo in a variable name, and
suddenly you've fixed a potential bug that was lurking in your code. And
the cost of the time to add those declarations is nothing compared to
diagnosing and fixing bugs reported by distant users.

-- Alex.
P.S. of course, YMMV.
My taping skulls are bid, so I often spill thongs wring - maybe you
don't hive that problem :-)


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weird variable thing in 8.1.5

Mark Wieder via use-livecode
I can't imagine the number of hours I would lose without having that option
on. I have about 50000 lines of code if not more..... So maybe I need it
more than most people.

On Jul 16, 2017 3:38 PM, "Alex Tweedly via use-livecode" <
[hidden email]> wrote:

>
>
> On 16/07/2017 18:49, Jonathan Lynch via use-livecode wrote:
>
>>
>> In 14 years with LC I have never used that option.
>>
>>
>> You should try it :-)
>
> Can be a bit of a pain to add all the local variable declarations - BUT
> every so often it will help you discover a typo in a variable name, and
> suddenly you've fixed a potential bug that was lurking in your code. And
> the cost of the time to add those declarations is nothing compared to
> diagnosing and fixing bugs reported by distant users.
>
> -- Alex.
> P.S. of course, YMMV.
> My taping skulls are bid, so I often spill thongs wring - maybe you don't
> hive that problem :-)
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...