Re: [qooxdoo-devel] How to delete an item from a TreeVirtual

2007-09-17 Thread westor
Suggestion for prune: Shouldn't prune bring back an array of the removed node id's? That would be helpful for anyone who wants to associate other data (e.g. an array of additional data, not displayed in the tree) together with the nodes. I, for my needs, have overwritten prune like this: prun

Re: [qooxdoo-devel] How to delete an item from a TreeVirtual

2007-09-16 Thread dperez
I've written that too quickly. I've seen that the prune method already does the job ok. At first I didn't find it, because I expected a method called something like 'remove' or 'delete'. Derrell Lipman wrote: > > On 9/14/07, dperez <[EMAIL PROTECTED]> wrote: >> >> Thanks Dioc >> I will try this

Re: [qooxdoo-devel] How to delete an item from a TreeVirtual

2007-09-14 Thread Derrell Lipman
On 9/14/07, dperez <[EMAIL PROTECTED]> wrote: > > Thanks Dioc > I will try this code, and will add it as a method of class > SimpleTableDataModel I don't think this is correct. Why is it selecting the parent node unconditionally? The proper way to remove a node is to use dataModel.prune().

Re: [qooxdoo-devel] How to delete an item from a TreeVirtual

2007-09-14 Thread dperez
Thanks Dioc I will try this code, and will add it as a method of class SimpleTableDataModel Dioc wrote: > > Hello, > > I am using the following code (method) to delete a node from TreeVirtual: > > /** > * Deletes given node from tree. > * > * @param node {Object} > * Reference

Re: [qooxdoo-devel] How to delete an item from a TreeVirtual

2007-09-14 Thread Dioc
Hello, I am using the following code (method) to delete a node from TreeVirtual: /** * Deletes given node from tree. * * @param node {Object} * Reference to node object that should be deleted. */ deleteNode : function(node) { if (node) { var dataModel = this.getDataModel(

[qooxdoo-devel] How to delete an item from a TreeVirtual

2007-09-14 Thread dperez
Hi, I've been searching the forums and the API, and see no method for removing an item from a TreeVirtual. Should I remove the node from its parent list of children nodes? If necessary, I can make an implementation of it. Regards David -- View this message in context: http://www.nabble.com/Ho