ListBehaviour query not working properly in 10.x?

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderator: Klaus

Post Reply
thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 383
Joined: Mon Mar 01, 2010 7:13 pm
Contact:

ListBehaviour query not working properly in 10.x?

Post by thatkeith » Sun Jan 12, 2025 4:47 pm

In 10.0.0 and 10.0.1 RC3, when I check the listBehaviour of a field I get inconsistent results:

If I add a field to a new project and check the listBehaviour status in the Message Box I get nothing at all, whether it's a regular scrolling field or a scrolling list field. This persists even if I use the Inspector to change the listBehaviour setting.

But if I use the Message Box to set this by script, then querying this in the Message Box returns "true" – regardless of the actual Inspector-set state and behaviour.

Yes, it's a bit confusing!

This works as expected in the latest version of 9.
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: ListBehaviour query not working properly in 10.x?

Post by bn » Sun Jan 12, 2025 8:42 pm

Hi Keith,

Using 10.0.1 RC3 I have no problem to query the fields from the message box.
Changing the listBehaviour setting via Property Inspector or by script from msg box is all reported correctly when querying the fields from msg box.
(M1 Mac, Sequoia 15.2)

Kind regards
Bernd

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 383
Joined: Mon Mar 01, 2010 7:13 pm
Contact:

Re: ListBehaviour query not working properly in 10.x?

Post by thatkeith » Sun Jan 12, 2025 10:39 pm

Odd.

1. Launch 10.0.1 (rc 3) and make a new stack
2. Drag-drop a Scrolling Field object onto the card
3. In the Message Box run this: put the listBehaviour of field 1
4. No result

5. In the Inspector, check the List Behaviour box
6. In the Message Box run this: put the listBehaviour of field 1
7. No result

8. Run this: set the listBehaviour of field 1 to false
9. The Inspector still shows the field's List Behaviour value as true/checked
10. Run this: put the listBehaviour of field 1
11. Result: "false"

The end result is that I do finally get a result when querying the listBehaviour status, but it doesn't match up with what's shown in the Inspector.

macOS 15.0.1
MacBook Pro
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: ListBehaviour query not working properly in 10.x?

Post by bn » Mon Jan 13, 2025 9:47 am

The spelling is:

listBehavior

not

listBehaviour

Once I do your recipe with listBehavior it all works.

Kind regards
Bernd

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 383
Joined: Mon Mar 01, 2010 7:13 pm
Contact:

Re: ListBehaviour query not working properly in 10.x?

Post by thatkeith » Tue Jan 14, 2025 10:36 am

Aaahahaha - thank you, that's hilarious. Also a tad embarrassing, but mainly funny. Classic PBKAC. :lol:

k
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: ListBehaviour query not working properly in 10.x?

Post by jacque » Tue Jan 14, 2025 7:15 pm

If it makes you feel better, know that Mark Waddingham complained many years ago that he often made the same mistake. Ditto for "color".
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 383
Joined: Mon Mar 01, 2010 7:13 pm
Contact:

Re: ListBehaviour query not working properly in 10.x?

Post by thatkeith » Thu Jan 16, 2025 10:20 am

I'd be happy to have British English spelling support in the language, although to be fair this is at the Easter Egg level of importance... i.e. not at all. :D
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

Post Reply