On 9/27/07, Derrell Lipman <[EMAIL PROTECTED]> wrote:
>
> Your code you provided didn't call that method, but it's true that you
> can't call it on nodes whose parent is not opened.
>
> I'm trying to decide if the correct solution here is to document that you
> can't call nodeToggleOpened() (and most or maybe all of the node*() methods)
> on node whose parent is not opened... or to incur the overhead of the
> additional nodeId field in each node.  I'm leaning towards the latter, just
> for ease of use, but I need to think about it some more.
>
> I think I know which choice you'd prefer. :-)
>

Ok, ease-of-use and lack of confusion trumps a bit of extra memory.  David,
please try the attached (untested) patch and let me know how it works.  Note
that this is against legacy_0_7_x to which I applied another small change
earlier, so you should "svn up" before applying the patch.  Once you confirm
that it works properly, I'll check it in.

Cheers,

Derrell
Index: frontend/framework/source/class/qx/ui/treevirtual/SimpleTreeDataModel.js
===================================================================
--- frontend/framework/source/class/qx/ui/treevirtual/SimpleTreeDataModel.js	(revision 10333)
+++ frontend/framework/source/class/qx/ui/treevirtual/SimpleTreeDataModel.js	(working copy)
@@ -417,6 +417,7 @@
       var node =
       {
         type           : type,
+        nodeId         : nodeId,
         parentNodeId   : parentNodeId,
         label          : label,
         bSelected      : false,
@@ -637,10 +638,6 @@
               continue;
             }
 
-            // Listeners will need to know a node's id when they receive an
-            // event.
-            child.nodeId = childNodeId;
-
             // (Re-)assign this node's level
             child.level = level;
 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to