The selectedText for controls without focus

Mike Bonner bonnmike at gmail.com
Fri Feb 24 16:15:14 EST 2017


The difference is, turning traversal off, rather than setting the locktext
to true doesn't work. Even if one manages to hilite text in the
non-traversable field, it isn't really selected. (Which is why if it were
me I'd not do it that way)


On Fri, Feb 24, 2017 at 1:35 PM, Richard Gaskin via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Bob Sneidar wrote:
> > On Feb 24, 2017, at 10:06 , Richard Gaskin wrote:
> >>
> >> That should not be needed.
> >>
> >> LiveCode allows only one active field selection in non-list fields.
> >
> > Yes I did. It returns empty. I have a menu which intercepts the
> > Copy menu selection. I hilite the text in a field whose traversalOn
> > is false, then select Copy from the menu. In the menu handler I have
> > "put the selectedText". I also tried "hilitedText". Neither work. I
> > also tried the hilitedText of field "fldIPAddress". No bueno. If
> > however you SET the hilitedText from a handler, it DOES return
> > something. So it's clear that the property CAN be set even if
> > traversalOn is false. The engine is just not doing it.
> >
> > This has actually been the case since version 2 when I began using
> > Revolution.
>
> Which Copy menu item, LC's or one of yours?
>
> In my last recipe I was using the copy command but you said you were
> having issues with the selectedText, so I came up with this one:
> http://fourthworldlabs.com/rev/LockedFieldText.livecode
>
> If has one menu and a simple script in it:
>
> on menuPick pItemName
>    put the selectedText
> end menuPick
>
> So here everything I do with selections in locked fields gives me the same
> results as unlocked fields.  I've had products that rely heavily on this
> behavior.  If you're seeing something different we need to dig into
> specifics to discover the differences.  But once we do I'm confident we can
> get it to work for you.
>
> --
>  Richard Gaskin
>  Fourth World Systems
>  Software Design and Development for Desktop, Mobile, and Web
>  ____________________________________________________________
>  Ambassador at FourthWorld.com        http://www.FourthWorld.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
>



More information about the use-livecode mailing list