empty selectedChunks fails to return insertion Point values

Ken Ray kray at sonsothunder.com
Sun Apr 11 13:01:44 EDT 2004


Sannyasin,

Same problem coming from a palette, but if the button is on the same stack,
it works (OS 10.3.3, Rev 2.2)...

Sounds like a bug to me. In fact it seems like it might have been posted
before, so you might want to check Bugzilla.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/


> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Sannyasin Sivakatirswami
> Sent: Sunday, April 11, 2004 11:55 AM
> To: use-revolution at lists.runrev.com
> Subject: empty selectedChunks fails to return insertion Point values
> 
> 
> 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
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 




More information about the use-livecode mailing list