The selectedText for controls without focus

Richard Gaskin ambassador at
Fri Feb 24 15:35:50 EST 2017

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:

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

More information about the use-livecode mailing list