empty selectedChunks fails to return insertion Point values
Sannyasin Sivakatirswami
katir at hindu.org
Sun Apr 11 12:55:04 EDT 2004
I have a palette of html mark up tools that operate on the top window.
I am unable to get the insertion point for an empty cursor from the
selectedChunk function (it used to work!). A test button in the palette
with its traversalOn set to false (so as not to deselect text in the
top Stack).
Simply:
on mouseUp
put the selectedChunk
end mouseUp
If text is selected in the top window we do get the expected response,
e.g. char 4633 to 4654 of field 1 so my button, the field, and the
selectedChunk function are apparently OK.
But, if we simply insert the cursor somewhere and press the same button
we get empty, zippo.
But, the function, as documented, should return a string like this for
just an insertion point:
char 51 to char 50 of field 1
===docs:
Comments:
The return value reports the selected text: the startChar is the first
character of the selection, and the endChar is the last character.
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.
========
Why is this not working? OS X... Rev 2.2 Can anyone confirm this is
failing also on their Mac?
OS X 10.3.3
This is a nuisance, (obviously) as I have to now prompt the user to
select an empty space for insertion of stand alone elements like
<hr class="mainHeadLineRule" />
<br />
when what is wanted is to simply place the cursor then click those
respective buttons on the palette.
??
TIA
Sannyasin Sivakatirswami
Himalayan Academy Publications
at Kauai's Hindu Monastery
katir at hindu.org
www.HimalayanAcademy.com,
www.HinduismToday.com
www.Gurudeva.org
www.Hindu.org
More information about the use-livecode
mailing list