Arrow keys . . ,

Mark Wieder mwieder at ahsoftware.net
Sat Sep 4 13:01:21 EDT 2010


Richmond-

Saturday, September 4, 2010, 9:37:22 AM, you wrote:

> Sounds a good idea, but, I want the situation
> that there is NO char selected, just the insertion point
> lying between 2 chars.

Right. So if you check the selectedChunk in a selectionChanged handler
you can tell the difference.

If it's just an insertion point you'll get something like
char 26 to 25 of field 1
and if it's a text selection (more than one char) you'll get
char 24 to 25 of field 1

Note that the first char selector is *greater* than the second if it's
just an insertion point.

on selectionChanged
  if word 2 of the selectedChunk > word 4 of the selectedChunk then
    put "this is ok."
  else
    put "I'm going to ignore the text chunk."
  end if
end selectionChanged

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list