dperez <[EMAIL PROTECTED]> writes:

> Hi Christian,
>
> I use successfully
>    myTreeModel.setState(node, {custom1: 'myvalue'});
>
> Christian Boulanger (Bibliograph Development) wrote:
>> 
>> Hello,
>> 
>> what is the preferred way of attaching non-public custom data to the 
>> nodes in the data model? For example, I want to attach node ids which 
>> are different from the nodeId given by the data model? Can I set custom 
>> properties to the node data through setState or there another way that 
>> one should use?

David's method is allowed and currently not discouraged, but probably
should be.  The problem is that it leaves open the possibility that the
property name you use in your own code may at some future time be used
within the TreeVirtual helper classes.  TreeVirtual's use of it would
disrupt your code, and vice versa.

Yours is not the first question on this issue.  I think I'd like to add
set/getUserState() methods that would allow saving data in the data
model that will never have a chance of conflicting with internal
properties.  Please post an enhancement bug for this and I'll look into
it when I get a chance.

Cheers,

Derrell

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to