svn commit: samba r20924 - in
derrell at samba.org
derrell at samba.org
Sun Jan 21 00:18:42 GMT 2007
simo <idra at samba.org> writes:
> The Tree widget has a bad behavior, when you click on the plus/minus
> sign of a never retrieved object the object itself is loaded in the
> table but it does not check if there are children on the first time.
> So to actually see if an object has children you have to click on it 3
> times. This is actually very annoying.
> How do I make it load them on the first click on a plus sign?
I believe that is a bug in the tree implementation. I have it on my to-do
list to fix that. (I do much of the Tree code maintenance.) You needn't
worry about it; it's not specific to this application. When I get it fixed,
I'll incorporate the fix into Samba. (Ping me in a couple of weeks if it's
not yet done.)
> Is it possible to actually click a plus/minus icon without also
> selecting the clicked entry? I'd like to be able to open a tree
> component without necessarily loading the object data.
> The object has obviously knowledge of what you have clicked (the body or
> the plus/minus icon) but I couldn't find much about how the object is
> actually selected.
That's related to the Selection Manager. I don't recall (if I ever knew) how
one might do that, but as I'm looking through the tree code to fix the above
bug, I'll see if I can figure out how to do that.
> I think (not tested) that ones an object is loaded it is never
> refreshed, is there an easy way to do it? is it possible to add an icon
> to the label so that when you click that icon the object is actually
> refreshed ? What if I delete an object in the ldb db? can I remove just
> the objet from the tree an count on the fact that all children will
> automatically be removed and resources be freed?
IIRC, I trap the TreeOpenWhileEmpty event, and load the data then. You could
certainly trap also the TreeOpenWithContent event and see if anything has
You should also be able to add a handler for an icon to refresh the data.
I have recently been working on a Virtual Tree widget, in qooxdoo svn.
Rendering is the slowest thing a browser has to do, and rendering large trees
can be painfully slow. the Virtual Tree renders only the data that's visible,
and repaints the pane with new data when you scroll. It's WAY faster (no
noticeable delay even with 3000 leaf nodes in a branch!). I'm also trying to
fix some of the other known issues the Tree and TreeFullControl widgets have
as I work on this. It is my expectation that eventually, TreeVirtual will
replace both of the other two. Switching to it will require some code
changes, but for what we're doing in LdbBrowse, shouldn't be too difficult.
I'd guess it's still a number of weeks off, though, before I consider
TreeVirtual ready to be used by the masses.
BTW, you'll learn a lot by monitoring the qooxdoo mailing list. I highly
recommend that you join it.
More information about the samba-technical