Inserting a character (LC 7.0.1)

J. Landman Gay jacque at hyperactivesw.com
Sun Nov 2 16:09:58 EST 2014


On 11/2/2014, 2:25 PM, Graham Samuel wrote:
> Thanks Jacque, as I didn't think anything had been selected, I never thought of 'the selection'. In fact the LC dictionary says
>
>> >The selection is a reference to the currently selected text.
> Which doesn't seem to accord with a flashing cursor in a text string and nothing highlighted, i.e. nothing selected - but there it is.

I thought it was under "selection" but it turns out the explanation is 
under "selectedChunk":

"If no text is selected but the text insertion point is in a field, the 
startChar is the character after the insertion point, and the endChar is 
the character before the insertion point. In this case, the endChar is 
one less than the startChar."

I think it should be in both places. "Selection" is easier to work with 
than parsing the selectedChunk and putting new text after word 2 of it.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list