Welcome to the rTree forum!

This is a forum focused on providing support for rTree

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

Welcome to the rTree forum!

Post by wilstrand » Fri Jan 28, 2011 2:16 pm

Dear All!

Most welcome to this forum where you can ask or comment anything related to the rTree Tree control for LiveCode.

Tapirsoft is committed to continue improving rTree so all questions, requests and ideas are important to us.

UPDATE:

I'm proud to announce the release of rTree 2.0.0!
rTree is now Dual Licensed.

Download: http://tapirsoft.on-rev.com/rtree/

I will be back with more info in the forums and on the web site shortly.

Hope rTree will make good use in your projects!
With my best regards!

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Welcome to the rTree forum!

Post by Mark » Wed Feb 02, 2011 12:47 am

Why does your revlet need local disk access? That makes your demo suspect.

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

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

Re: Welcome to the rTree forum!

Post by wilstrand » Wed Feb 02, 2011 1:07 am

Mark wrote:Why does your revlet need local disk access? That makes your demo suspect.
Hi Mark!

If you right clicked in the rTree control you should have got a context menu with option "Build Tree From" which opens a submenu "File System". From there you are asked to choose a directory on your hard disk to load as a node into the tree. Also if you choose "Text File" from the sub menu you will get a dialog asking for you to choose a text file. This is to demonstrate data binding to the control. You can look at the code accessing the hard disk in the script of button "TreeMenu" of card 1 if you download the stack. Please let me know if this answers your question.

With my best regards

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Welcome to the rTree forum!

Post by Mark » Wed Feb 02, 2011 1:10 am

Thanks for the explanation. Such information is important, if local disk access is required.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Welcome to the rTree forum!

Post by Mark » Wed Feb 02, 2011 1:24 am

Hi,

The revlet is too big to fit on my screen. The tree itself looks nice but seems a bit slow, especially scrolling the field (but that isn't necessarily your fault). I see no way to collapse/expand all nodes, but I assume it could be scripted. What I don't like about all tree objects that I have seen so far, including this one, is that they are very complicated. All those properties and features may be nice, but they make the tree control complicated and possibly slow. It is a nice attempt. Is it possible to create nodes in Arabic, Russian and Chinese? I think that the time indicators are incorrect: when I change the theme, it definitely takes 2 seconds to set up the new tree, but your revlet claims it was done in 0.34 secs.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

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

Re: Welcome to the rTree forum!

Post by wilstrand » Wed Feb 02, 2011 12:57 pm

Hi Mark!

Thanks for trying the revlet and giving feedback! I´ll try addressing the issues you have brought up:
Mark wrote:The revlet is too big to fit on my screen.
I have made the revlet a little smaller and hope it is now easier to view with less scrolling even on lower screen resolutions.
Mark wrote:The tree itself looks nice but seems a bit slow, especially scrolling the field (but that isn't necessarily your fault).
Could you please give me a little more info here? The rTree Engine is not involved in the scrolling (It just scrolling a LiveCode Field object).
Mark wrote:I see no way to collapse/expand all nodes, but I assume it could be scripted.
I´ve added "Expand all" and "Close all" examples to the documentation under "Sample Scripts".
Mark wrote:What I don't like about all tree objects that I have seen so far, including this one, is that they are very complicated. All those properties and features may be nice, but they make the tree control complicated and possibly slow. It is a nice attempt.
Here I do not agree with you! rTree has been developed with native LiveCode controls as "blueprints" Think of the standard field control. Under the hood it is really complicated with tons of properties and features and yet for us as LiveCode developers it is possible to just drop a field on the card and start typing. rTree aims at offer the same! At least as far as possible without being a native control. For example rTree offers you to type directly into the control, hit the return key to create new nodes, direct editing the node name by doyble clicking it and then rearange the nodes by Drag and Drop. If you like you can create a fully working tree in minutes without writing a single line of code.
Mark wrote:Is it possible to create nodes in Arabic, Russian and Chinese?
This is an area which I need to dig into. To be honest I havent thought of it at all! Thanks for pointing it out!
Mark wrote:I think that the time indicators are incorrect: when I change the theme, it definitely takes 2 seconds to set up the new tree, but your revlet claims it was done in 0.34 secs.
You are right! It was a bug in the engine causing recursive processing of the nodes when setting the Themes. I have sorted it out and an updated v1.0.1 is available for download and as revlet. I would very much appreciate if you could use your sharp eyes on the new version!

With my best regards

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

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Welcome to the rTree forum!

Post by bangkok » Thu Feb 03, 2011 11:59 am

Anyway, I've played a few minutes with your library. And it was really easy to create a tree, create a few nodes etc.

It looks really great, and easy to use. Bravo.

You know what ? My biggest problem now would be to... find how I could use trees in my apps !
:D

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

Re: Welcome to the rTree forum!

Post by wilstrand » Thu Feb 03, 2011 1:42 pm

Hi Bangkok!

Thanks for taking the time to try it out and for your kind feedback!
I,m very interested in what is "intuitive" and what is not. So I wonder if you could tell me what was your first intuitive way of creating a tree and nodes?

With my best regards

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Welcome to the rTree forum!

Post by Mark » Thu Feb 03, 2011 4:39 pm

Hi Mats,

I have no more info about scrolling. I simply noticed that scrolling is slow. This might be a LiveCode problem rather then a problem with your tree object.

Surely, you don't need to agree with me. If you think that your product sells better if people are overwhelmed by the vast amount of features and options, so be it. I guess there are indeed people who like that.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Welcome to the rTree forum!

Post by malte » Thu Feb 03, 2011 4:45 pm

I like to create trees from arrays. Feed a single array and then draw the whole thing in one go without the overhead of calling lots of handlers, however that is just me, as I usually work with pretty large trees. The problem as it stands with all trees in LC I have seen until now is that they use a field control to render their display. This might be an obvious choice, however it adds a lot of overhead (lines being drawn that are miles out of view). What I would really love to see, would be a tree that follows the datagrid approach and uses a group of groups (I know, major PITA to code, otherwise I would probably have written my own one, but lazy me *sigh*) and draws only those controls that are actually in view. The field control can slow to a crawl wen there are many (tenthousands) of nodes to display, while actually there are only 50 in view. My strategy until now was to to redraw the tree only for the node (and parent nodes obviously) currently been worked on. That is a hassle to do, but otherwise the speed impact is just a big one. Please do not get me wrong, for most Projects rTree or dataTree or even the iMed tree will just work fine. Just not when you have to display huge amounts of data...

Cheers,

Malte

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

Re: Welcome to the rTree forum!

Post by wilstrand » Sun Feb 06, 2011 11:30 pm

Hi Malte!

In the developing of rTree I have thought a lot on the subjects you are bringing up! Like you I am found of arrays. Arrays are wonderful creatures and when LiveCode also introduced multi-dimensional arrays I was really exited! However, in my opinion the implementation of multi-dimensional arrays in LiveCode have some serious drawbacks that cripple their full potential to the extent that I decided to go for uni- and two-dimensional arrays as building blocks for the rTree control.

This is how I see it:
To make a Tree control really powerful you need at least three main routines that are fast and optimized. The first one is obviously loading the data into the Tree and creating the nodes. The second one is being able to access the data in the Tree and its nodes efficiently. And finally the third routine of course is rendering the Tree.

Regarding loading data and creating nodes, using a multi-dimensional array would be very good and for larger Trees probably the fastest way of doing it.

The second routine - accessing the data in a Tree - using a multi-dimensional array raises some interesting questions! If we for example would like to get the expanded property of a node we have clicked in the Tree, we actually cannot get that value directly from a multi-dimensional array stored as a custom property of the Tree! My understanding is that you cannot use -- set the treeData[nodeID]["name"] of control "Tree" to "My first Node". Instead you need to load the whole array into a variable first. For small amounts of data this is no problem but if a Tree has let’s say 1 000 000 Nodes, loading the whole array could result in access times of seconds. In comparison access times when using two-dimensional arrays would be a few milliseconds. I could have misunderstood how this works and there could be ways around this that I have not thought of, so I would be grateful to know your and others view on this! Anyhow, from a performance point of view this has been the main reason for me not collecting the Tree data into one multi-dimensional array. I attach a small stack that I have used for simple comparison of loading and access times between two-dimensional and multi-dimensional arrays methods.
ArrayTest.1.0.rev.zip
(10.22 KiB) Downloaded 1194 times
As for the third routine of rendering the Tree I fully agree with you that to work with large Trees the rendering should only be done on the 50 or so nodes visible to the user and this is a planned feature of rTree 2.0. I still want to explore continuing using a field for display even though it will not render more nodes than shown to the user. The reason is that I think that using a field with text and imageSources will perform better on the mobile platforms than a solution with a number of separate controls as nodes. This is only my guess as I have not made enough testing and I would be very interested in hearing your thoughts on this as well.

With my best regards
http:www.tapirsoft.on-rev.com
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects

edmerckx99
Posts: 8
Joined: Sat Nov 20, 2010 2:32 am

Re: Welcome to the rTree forum!

Post by edmerckx99 » Fri Jan 11, 2013 1:01 am

its looks the name record for the tapirsoft website has expired. does anyone know if rTree is actively being supported/updated?

Locked

Return to “rTree”