Insertion point problems

dunbarx at aol.com dunbarx at aol.com
Mon Jun 22 17:29:47 EDT 2015


Hi.


I don't understand. If you have text selected in the field, what are you doing with the value that the selectedChunk sets into the local variable "it"?


You never say where to paste that text. What does this do for you, perhaps with some text selected in a  field 1? It "puts", rather than "pastes", but maybe that is better?



on mouseUp
   set the defaultStack to the topStack
   get the selectedChunk
   put the value of it after fld 1
end mouseUp


Of course, a simpler way is to:



on mouseUp
   set the defaultStack to the topStack
   get the selectedText
   put it after fld 1
end mouseUp



Craig Newman





set the
defaultStack to the topStack
get the selectedChunk






-----Original Message-----
From: David Epstein <dfepstein at comcast.net>
To: use-livecode <use-livecode at lists.runrev.com>
Sent: Mon, Jun 22, 2015 5:20 pm
Subject: Insertion point problems


1.  With a word selected in field 1 of the topStack, a menu button in a palette
issues a command “Paste”.  The handler for this command includes

set the
defaultStack to the topStack
get the selectedChunk
— test whether the chunk is a
suitable place to paste, and if so then
paste

This works fine if there is
actually a word selected in field 1.  But if there is only an insertion point it
does not work; the selectedChunk is reported as empty.  (On mouseDown on the
palette menu, a selected word stays selected; but a blinking insertion point
disappears).

2.  Results above both in LC 5.5 and LC 7.01.  But I notice
another problem in 7.01 (unlike in 5.5):  the insertion point does not blink.  I
see it blink just after typing a character, and it blinks once when the stack is
activated, but when nothing is happening there is no indication of where the
insertion point is.

Do others see this, or have solutions?

David
Epstein
_______________________________________________
use-livecode mailing
list
use-livecode at lists.runrev.com
Please visit this url to subscribe,
unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
 



More information about the use-livecode mailing list