Hello!
I'm currently facing the following problem: within a "ReturnInField" handler (which gets called whenever a user hits "Return" while the underlying "Field" has the keyboard focus) I'm trying to use "the selectedChunk" to determine the position of the insertion point - but unfortunately, "the selectedChunk" always yields "empty".
Within the debugger, I can see that the handler gets called but "the selectedChunk" does not produce a result. A similar construct within a "BackspaceKey" handler works as foreseen - unfortunately, however, I can't use "ReturnKey" within a "Field"...
Does anybody have an idea how to circumvent this problem?
Thanks in advance for any help!
ReturnInField and selectedChunk
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
ReturnInField and selectedChunk
Kind regards,
Andreas Rozek
Andreas Rozek
Rozek,
What exactly makes you think that the selectedChunk is empty? Try this:
The debugger makes selections empty because the active line in the debugger is selected. The debugger probably interferes with your script.
Best,
Mark
What exactly makes you think that the selectedChunk is empty? Try this:
Code: Select all
on returnInField
put the selectedChunk
pass returnInField
end returnInField
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode