WEIRD: code changes the code instead of a field

Klaus major-k klaus at major-k.de
Tue Mar 21 07:41:25 EDT 2017


Hi Tiemo,

> Am 21.03.2017 um 12:16 schrieb Tiemo Hollmann TB via use-livecode <use-livecode at lists.runrev.com>:
> 
> Hi Klaus,
> it's not an issue of numToChar (happens similar with numToNativeChar) but
> probably of the IDE/Debugger, who thinks that the selectedChunk is my code.

OK, that was just a shot in the dark, but please try again with LC 9 DP6 just to be sure.

> Tiemo
> 
> -----Ursprüngliche Nachricht-----
> Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im Auftrag
> von Klaus major-k via use-livecode
> Gesendet: Dienstag, 21. März 2017 12:12
> An: How to use LiveCode <use-livecode at lists.runrev.com>
> Cc: Klaus major-k <klaus at major-k.de>
> Betreff: Re: WEIRD: code changes the code instead of a field
> 
> Hi Tiemo,
> 
>> Am 21.03.2017 um 11:49 schrieb Tiemo Hollmann TB via use-livecode
> <use-livecode at lists.runrev.com>:
>> 
>> Hello,
>> 
>> LC 9.0, dp4, Win10: Fiddling around creating a password field I am 
>> encountering a very weird phenomenon. Stepping thru my code with the 
>> debugger my code modifies my code instead of a field. Recipie:
>> 
>> -          Create a new stack
>> -          Create a new field
>> -          Put the code into the field:
>> 
>> on keyDown pKey
>>   put numToChar(42) into the selectedChunk -- numToChar(42): "*"
>> end keyDown
>> 
>> -          Apply the code
>> -          Set a breakpoint (red dot) at the only statement
>> -          Switch to browse tool and enter one character into the field
>> -          Use the "step into" for executing the code
>> -          See what happened to your code?
>> -          The complete line of code is replaced by an asterisk! Funny

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list