Arrow keys . . ,

Richmond richmondmathewson at gmail.com
Sat Sep 4 13:06:31 EDT 2010


On 09/04/2010 08:01 PM, Mark Wieder wrote:
> 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
>
>    
Lovely, Thanks for the help.



More information about the use-livecode mailing list