select after the selectedText

Richmond Mathewson richmondmathewson at gmail.com
Wed Jul 6 02:54:12 EDT 2011


a.k.a. "Richmond's longest-lasting headache"

imagine this sort of script:

on mouseUp
    set the useUnicode to true
    set the unicodeText of the selectedText to numToChar(2340)
    select after the selectedText
end mouseUp

all looks straightforward (nicht?), but 'tis not to be . . .  :(

because   select after the selectedText  sends the cursor to the START 
of the unicodeText!

let's try:

on mouseUp
    set the useUnicode to true
    set the unicodeText of the selectedText to numToChar(2340)
    --select after the selectedText
end mouseUp

this results in exactly the same thing, which suggests  select after the 
selectedText
is "a dead duck"

of course, some folks suggested I use  select after fld "TiddleyPush"  when
I raised this issue previously; but that is also no good as it is no use 
at all for
in-text editing.

What I need is for the cursor to always remain right after the unicode 
glyph that
has just been entered.

. . . drowning over here . . .

Richmond.




More information about the use-livecode mailing list