tree view widget - array key doesn not exist error

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
okk
Posts: 176
Joined: Wed Feb 04, 2015 11:37 am

tree view widget - array key doesn not exist error

Post by okk » Wed Dec 30, 2020 9:28 pm

Hi, I created a tree view widget and added some keys and subkeys to it. It seems to work as expected, but I get in irregual intervals an error message, see screenshot. The widget continues to work normally, but the error message appears sometimes once in 30 minutes, then sometimes several times per minute (while I am using the tree view widget in browse mode). I am on LC 9.6.1 Indy on Macos 10.12.6. Havy anyone encountered the same error? Any hints what to do about, if anything? Thanks. Oliver
Screen Shot 2020-12-30 at 21.38.53.png

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm
Location: London, England

Re: tree view widget - array key doesn not exist error

Post by Bernard » Thu Dec 31, 2020 3:03 am

Does the array that's in the tree get repopulated? Or are the array values fixed? Could it be an encoding issue (those subkeys look like they are in Finnish - not that I can really recognise Finnish :roll: ).

I've been using tree view on LC 9.6.1 on Mac OSX with no problems. And my array is larger/more complex and is being re-populated dynamically on mousemove. But in my case my array key/values are all just using ASCII.

Bernard

okk
Posts: 176
Joined: Wed Feb 04, 2015 11:37 am

Re: tree view widget - array key doesn not exist error

Post by okk » Wed Jan 06, 2021 5:43 pm

Hi Bernard,
thanks for your reply. I have tested it also with English only keys. The error message appears when the mouse leaves the widget on the right hand side. That explains the seemingly randomness in my OP, I just didnt know then. I can now conistently trigger the error message. When the mouse leaves the widget on the top, bottom or left side there is no error message. I attach a sample stack. This is how I created the error in the tree view widget (all done from inspector):
1. create the widget
2. add elements
3. deselect "show values"
4. change sort order or make any other change in the inspector, like renaming a key
5. leave widget on the right side

And yes, it is Finnish, well spotted! But I would hope that LC could deal with Finnish, even though it is a unwieldly language.

Can anyone try to recreate the error?
Thanks.
oliver
Attachments
treeview_error.livecode.zip
(1.22 KiB) Downloaded 132 times

mrcoollion
Posts: 720
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: tree view widget - array key doesn not exist error

Post by mrcoollion » Wed Jan 06, 2021 6:30 pm

Tried your stack in Windows 10 LC 9.6.1 .
I got the same error in the top Tree view widget (with text Test 1 error).
Deleted the elements and added new ones (same name) and I still got the error
The below widget did not give this error.
Then I added a new widget with two new elements and this gave me no errors.

Maybe try to install a new version of Livecode?

Regards,

Paul.

okk
Posts: 176
Joined: Wed Feb 04, 2015 11:37 am

Re: tree view widget - array key doesn not exist error

Post by okk » Wed Jan 06, 2021 8:50 pm

Hi and thanks for testing. I think the culprit is the "SHOW VALUE" property. when you deselect it, then make a minor change of any other property in the inspector the error appears. The error disappears if you again select the "SHOW VALUE" property. can you confirm? You can follow the procedure in my previous post if you want to create the error. I think i will make a bug report.

Best
oliver

mrcoollion
Posts: 720
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: tree view widget - array key doesn not exist error

Post by mrcoollion » Thu Jan 07, 2021 10:26 am

I can also recreate the issue with your tree view as well as with a new placed Tree View (Windows 10 LC 9.6.1).
Procedure to get the error (slightly different):
1. create the widget
2. add elements
3. Set Tree View on "Read only" (if not than error does not show)
3. deselect "Show values"
4. change "Sort type"or make any other change in the inspector, like renaming a key
5. leave widget on the right side.

Please make a bug report Oliver ! Good finding :D

Regards,

Paul

okk
Posts: 176
Joined: Wed Feb 04, 2015 11:37 am

Re: tree view widget - array key doesn not exist error

Post by okk » Thu Jan 07, 2021 2:48 pm

Hi Paul,
thanks for making the effort to recreate the error. It is true that the widget needs to be set to READ ONLY in order for the error to appear. I filed the bug report, feel free to add to it, if you have further observations:
https://quality.livecode.com/show_bug.cgi?id=23056

Best
Oliver

Post Reply

Return to “Talking LiveCode”