rightclicking gives error message (in some cases)

This is a forum focused on providing support for rTree

Moderators: heatherlaine, robinmiller, kevinmiller, wilstrand

Post Reply
matthiasr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 70
Joined: Sat Apr 08, 2006 7:55 am
Location: Lübbecke, Germany
Contact:

rightclicking gives error message (in some cases)

Post by matthiasr » Thu Sep 22, 2011 11:25 am

Hi,
tried the new 1.5.6 of rTree.

i builded a tree (from filesystem). If i left click on a node the complete line is selected. I then can right click and a popup menu appears.
But if i double click a node then only the nodename is selected. If i then right click that node i get an error message:
"there was an error executing a script in stack rTreeEngine. No more information is available because the stack is password protected". This message is generated by GLX2 editor.
W/O glx2 enabled the livecode ide script editor just opens and asks for a password. But anyway there seems to be a problem.

The same message appears, if i try to delete a node either by rightclicking ->Delete or by pressing the "Delete key" or "FN+Backspace".

How can this be avoided?

Regards,

Matthias

wilstrand
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Mon Jan 03, 2011 3:02 pm
Contact:

Re: rightclicking gives error message (in some cases)

Post by wilstrand » Thu Sep 22, 2011 2:52 pm

Hi Matthias!

First thanks for bringing my attention to these flaws! I have fixed the error issue and uploaded a new version 1.5.7.

About the way rTree works:

By default if you double click a nodes text (label) that text will become editable. Turn this off by setting the editNodeOnDoubleClick tree property to false.
Also by default if you double click a node outside it's text the node will expand/collapse. Turn this off by trapping the mouseDoubleDown in the controls script.
A third default behavior is that if you click a node and then hit return, a new node will be created. Turn this off by setting the newNodeOnReturn tree property to false.

Hope this is of some help!

With my best regards,

Mats
http:www.tapirsoft.on-rev.com
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects

wilstrand
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Mon Jan 03, 2011 3:02 pm
Contact:

Re: rightclicking gives error message (in some cases)

Post by wilstrand » Thu Sep 22, 2011 11:51 pm

Hi Matthias!

I did not pay enough attention to your message! I missed the issue you had with deleting a node either by rightclicking ->Delete or by pressing the "Delete key" or "FN+Backspace".
I have now fixed it and uploaded rTree Workbench v.1.5.8.

With my best regards

Mats
http:www.tapirsoft.on-rev.com
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects

matthiasr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 70
Joined: Sat Apr 08, 2006 7:55 am
Location: Lübbecke, Germany
Contact:

Re: rightclicking gives error message (in some cases)

Post by matthiasr » Sat Sep 24, 2011 12:20 am

Hi Mats,

forgot to check the option "Notifiy me when a reply is posted". So i saw your posting only now.
Thanks for your prompt reponses and fixings. That´s really awesome.

I will investigate a more deeper into rTree at the weekend. I want to create a Tree of all volumes.
I want to create the subfolder nodes on the fly when the user expands a volume tree. And if the user then expands one subfolder i want to create
again the nodes for the subfolders in that folder. I hope this is easy to do. If not, it will be a weekend with less sleep. ;)

Thanks again for your support.

Matthias

wilstrand
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Mon Jan 03, 2011 3:02 pm
Contact:

Re: rightclicking gives error message (in some cases)

Post by wilstrand » Sat Sep 24, 2011 1:59 pm

Hi Matthias!

Thanks for your kind words! To have rTree display the filestructure of your volumes is really easy. All you have to do is to use the sourcePath node property. As soon as you expand or collapse a node rTree will use that nodes sourcePath to scan your filesystem, create nodes and make the necessary settings automatically. Please take a look at the code here below. It is all that's needed to accomplish what you want to do, so you should be able to get some sleep during the weekend :)

Code: Select all

on mouseUp
   # Clear the tree from old data.
   dispatch "delete_nodeData" to control "Tree"
   # Create a node and set name and sourcePath for each volume.
   repeat for each line tVolume in the volumes
      dispatch "new_node" to control "Tree"
      get the lastNodeID of control "Tree"
      set the name_of_node_ID_[it] of control "Tree" to tVolume
      set the sourcePath_of_node_ID_[it] of control "Tree" to tVolume
   end repeat
   dispatch "renderTree" to control "Tree"
end mouseUp
Please let me know if this is what you're looking for!

With my best regards

Mats
http:www.tapirsoft.on-rev.com
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects

Post Reply

Return to “rTree”