> To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>

>> ou can make a self-cleaning tree in RB code without weakrefs, though
>> you need to call the plugin API's Lock/Unlock functions - the
>> framework provides these if you know where to look ;) I use this
>> technique to travel a 3D scenegraph upwards from a leaf node and have
>> been very satisfied with the results.
>
> What do you mean?
>
> BTW there is a way to do tree Structures without all of that...

Yes. Use my ElfData plugin.

> But
> it's messy and takes a lot of code to make work dynamically.

Not if you use my ElfData plugin.

Mine also comes with a cool function called "FlatNext() as RingTree".  
Which basically can navigate the entire tree structure, as if it were  
a 1d array.

It's basically "stateless tree traversal". FlatNext stores no data  
about it's current position in the tree. It uses the current node to  
figure out where it is, and always knows the correct next node to  
return. It's also very fast.

And most importantly, I didn't learn this technique from anyone :) I  
just invented it myself. Well... reinvented the wheel, I'm sure  
others have figured this technique out before me, and I just didn't  
read of it.

It's always handy to have nice tree operation functions lying around,  
in case you need them.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to