Broken Treeview Widget issue

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mrcoollion
Posts: 738
Joined: Thu Sep 11, 2014 1:49 pm

Broken Treeview Widget issue

Post by mrcoollion » Fri Jun 10, 2022 9:48 am

Hello LC specialists,

I have the following problem, maybe someone can help?
I have a tree view widget that seems to be broken.
I have one branch that I cannot remove. There seem to be some non-visible characters in the tree name because the tree name is also used to go to a card with the same name as the tree but that does not work. It does work with other branches and sub-branches.
Is there some way to hack into the array of the Treeview widget to remove this branch manual?

Greetings,

Paul

mrcoollion
Posts: 738
Joined: Thu Sep 11, 2014 1:49 pm

Re: Broken Treeview Widget issue <Solved>

Post by mrcoollion » Fri Jun 10, 2022 10:24 am

Hi all,

I repaired the Treeview widget by removing the problem branch (third line) with the following code in a temporary button.
And then adding the needed Branch manual.

Code: Select all

on mouseup
   put "MainMenuTree" into tWidgedName
   //put the keys of tWidgedName into tKeys
   put the arraydata of widget tWidgedName into taWidgetData
   put the keys of taWidgetData into tKeys
   put line 3 of tKeys into tLineName
   delete variable taWidgetData[tLineName]
   put the keys of taWidgetData into tKeys2 // For checking if the correct branch has been deleted.
   breakpoint
   set the arraydata of widget tWidgedName to taWidgetData
   breakpoint
end mouseup
Friendly regards,

Paul

Post Reply