Error on 'put "My text" into the selection'

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6873
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Error on 'put "My text" into the selection' (Solved)

Post by FourthWorld » Thu Jun 20, 2019 10:32 pm

Klaus wrote:
Thu Jun 20, 2019 6:39 pm
Just tested with LC 9.04 on macOS 10.14.5, and yes traversalon or not, it works as advertized.
Looks like they have changed this in a former version, but this did definitively not work a long time ago.
Here on Ubuntu, v9.0.4 works as Raney and Waddingham have always described it: traversalOn shifts focus to the button, causing any selected text to become unselected.

Searching the v9.0.4 Release Notes for "text", "selection", "traversalOn", and "focus" all turned up empty.

Have you seen any indication from the team that the change you see in macOS is intentional?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Klaus
Posts: 11227
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Error on 'put "My text" into the selection' (Solved)

Post by Klaus » Fri Jun 21, 2019 9:46 am

FourthWorld wrote:
Thu Jun 20, 2019 10:32 pm
...
Have you seen any indication from the team that the change you see in macOS is intentional?
No, that was just an assumption, since this has been the case on the Mac, too, at least a long time ago. Therefore I did not try this again until yesterday and was really surprised to see it actually work.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6873
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Error on 'put "My text" into the selection'

Post by FourthWorld » Fri Jun 21, 2019 5:46 pm

The change may not be intentional, and may have implications for managing focus that could be undesirable in some contexts.

You might want to submit it as a bug report, and see how the team responds.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1033
Joined: Thu Apr 11, 2013 11:27 am

Re: Error on 'put "My text" into the selection'

Post by LCMark » Fri Jun 21, 2019 6:02 pm

The dictionary for traversalOn does describe the observed behavior (well, the language is a bit out of date, but if you read between the lines...):

----

Setting a field's traversalOn to true enables the user to tab into or click in the field for editing (if the field's lockText property is false). If a field's traversalOn and lockText properties are both set to true, the user can select text, but not change it, and can scroll within the field using the keyboard. If the traversalOn is true and the lockText is false, the field can be edited. If the lockText is true and the traversalOn is false, the user can neither select nor edit the field's text.

If the object is a group, setting its traversalOn to true causes tabbing into the group to set the focus to the first control in the group.

If the object is a control other than a group or field, if its traversalOn is true, and if the lookAndFeel is set to "Motif" or "Windows 95", the user can tab to the control, then press Return or Enter to send a mouseUp message to the object.

If the lookAndFeel is set to "Motif", "Macintosh", or "Appearance Manager", the active is outlined, and the control receives any keystrokes and the messages associated with them. (The outline can be turned off by setting the field's showFocusBorder property to false.) If the lookAndFeel is set to "Windows 95", the appearance of a focused field does not change, but it receives keystroke messages.

---

Essentially on macOS buttons never take focus, so traversalOn has no effect. On Windows and Linux they can take focus, so traversalOn does take effect.

The behavior here is tied to the lookAndFeel - so if you set the lookAndFeel to "motif" on mac (which does still work) your buttons will respond to traversalOn.

Klaus
Posts: 11227
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Error on 'put "My text" into the selection'

Post by Klaus » Sat Jun 22, 2019 1:44 pm

Hi Mark,
LCMark wrote:
Fri Jun 21, 2019 6:02 pm
...so if you set the lookAndFeel to "motif" on mac (which does still work) your buttons will respond to traversalOn.
yeah, and look butt-ugly! :D

Thank you very much for the clarification!


Best

Klaus

Post Reply

Return to “Talking LiveCode”