Insertion point problems

Peter Brigham pmbrig at gmail.com
Wed Jun 24 11:20:44 EDT 2015


What I do for this is store the selectedchunk in a customprop or a script
local on mouseEnter in the button script that will be doing the pasting.
That way if the mousedown removes the current selection you already have
the info you need. BTW, if you set the traversalon to false for the button,
the current selection should be preserved, which will obviate the need for
this workaround.

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig


On Tue, Jun 23, 2015 at 7:35 PM, Bob Sneidar <bobsneidar at iotecdigital.com>
wrote:

> On a Mac, I opened two stacks, one with a button, one with a field. I
> palletized the first stack, then set the insertion point in the field in
> the second one. Clicking the button in the palletized stack still causes
> the field on the second stack to lose focus.
>
> I don’t think there is a way to change this behavior. The workaround that
> comes to my mind is to have an exitField handler in the field which saves
> the selection in a property or global variable that the palette stack can
> access. Alternatively you could have an exitField handler inserted as a
> front script when the palette opens, so that the selection can be saved
> somewhere.
>
> That is how I would go about this.
>
> Bob S
>
>
> > On Jun 23, 2015, at 15:06 , J. Landman Gay <jacque at hyperactivesw.com>
> wrote:
> >
> > On 6/23/2015 4:49 PM, dfepstein at comcast.net wrote:
> >> I want a menu button in a palette to paste the clipboard's contents
> >> to the topStack at the selectedChunk.  This works if the
> >> selectedChunk actually includes some hilited text ("char 1 to 4..."),
> >> but not if the selectedChunk is an insertion point ("char 4 to
> >> 3...").  In the second case, but not in the first, the insertion
> >> point disappears and the selectedChunk property loses its value when
> >> a palette button is pressed, so the paste fails.
> >
> > This looks like a bug to me. If selectedchunk is valid in one case, it
> should also be valid in the other.
> >
> > --
> > Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> > HyperActive Software           |     http://www.hyperactivesw.com
> >
> > _______________________________________________
> > 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
>
> _______________________________________________
> 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