Insertion point problems

J. Landman Gay jacque at
Wed Jun 24 12:15:43 EDT 2015

I don't think traversal is the problem here. When I tested, my button did not have traversalOn set to true (that was the first thing I checked.) The anomaly is that the selectedChunk works fine if the selection contains text, it only fails if the selection is a simple insertion point. 

Both instances should work identically. 

On June 24, 2015 10:27:04 AM CDT, Richard Gaskin <ambassador at> wrote:
>Yes, the traversalOn property is the key here.
>Only one object can have focus at any given time, so when traversing 
>among controls with the keyboard any field selection will be cleared.
>But by turning off the traversalOn property for buttons you want to be 
>able to act on text, the focus remains in the field and things work as 
>easily as you'd expect with LiveCode.
>  Richard Gaskin
>  Fourth World Systems
>  Software Design and Development for the Desktop, Mobile, and the Web
>  ____________________________________________________________________
>  Ambassador at      
>Peter Brigham wrote:
>> What I do for this is store the selectedchunk in a customprop or a
>> local on mouseEnter in the button script that will be doing the
>> That way if the mousedown removes the current selection you already
>> the info you need. BTW, if you set the traversalon to false for the
>> the current selection should be preserved, which will obviate the
>need for
>> this workaround.
>> -- Peter
>> Peter M. Brigham
>> pmbrig at
>> On Tue, Jun 23, 2015 at 7:35 PM, Bob Sneidar <bobsneidar at
>> wrote:
>>> On a Mac, I opened two stacks, one with a button, one with a field.
>>> palletized the first stack, then set the insertion point in the
>field in
>>> the second one. Clicking the button in the palletized stack still
>>> the field on the second stack to lose focus.
>>> I don’t think there is a way to change this behavior. The workaround
>>> comes to my mind is to have an exitField handler in the field which
>>> 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
>>> somewhere.
>>> That is how I would go about this.
>>> Bob S
>use-livecode mailing list
>use-livecode at
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:

Jacqueline Landman Gay         |     jacque at
HyperActive Software           |

More information about the Use-livecode mailing list