Lets suppose I have a list field with multiple lines, p. eg.
RINGO
GEORGE
JOHN
PAUL
And his his script is:
on mouseup
put the selectedtext into theSel
end mouseup
Well. Now, to check its operation, I put a breakpoint at the beginning of the code (on mouse up)
If I go to the field and click, p. eg. the second line, the debugguer is activated and when it reaches the end (end mouseUp), the variable theSel does not show 'GEORGE' as is expected.
What it shows is: "put the selectedtext into theSel".
Curious! I guess it's because the LiveCode debugguer had just select this line as a visual aid for monitoring debug.
A debugger too obedient
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: A debugger too obedient
Hi Fermin,
if you codethen the debugger shows "George".
The unspecified selectedText is any selectedText at the moment. In this special case line 2 of the ScriptEditor
you can see the difference when you step through this code
I would not think it is a bug because that is the way selectedText works. Others may differ on this.
Kind regards
Bernd
if you code
Code: Select all
put the selectedtext of me into theSel
The unspecified selectedText is any selectedText at the moment. In this special case line 2 of the ScriptEditor
you can see the difference when you step through this code
Code: Select all
on mouseup
put the selectedText of me into tRealSelection
put the selectedtext into theSel
put the selectedText into tCurrentSelection
end mouseup
Kind regards
Bernd
Re: A debugger too obedient
Thank you, Bernd. Now I see it's not a bug, but the correct way the debugger works .
The words "of me" are key.
The words "of me" are key.
Re: A debugger too obedient
You have to remember that all IDE elements are simply ordinary stacks. If the debugger has focus, it may insinuate itself into your (ongoing?) processes. I got caught in this way just recently, and also thought it was a bug.
Craig Newman
Craig Newman