|
From: Donal K. F. <don...@ma...> - 2004-09-24 08:44:54
|
Joe English wrote: > On the other hand, just about as often the source data *doesn't* > have any notion of a node identifier, so there's an extra burden > on the programmer to manufacture one. This could just be a matter > of using "#auto" and letting the Tree widget generate one, > but still... Having to mess around with node identifiers was one of the bits that made using the BWidget tree much more complex when I used it. A scheme more like the canvas's ids would make much more sense to me for the simple cases. "Make common things simple..." > [Brett Schwarz wrote:] >> Of course, one >> could just keep a reference to the node id (generated >> from treeview) and client data in a separate >> structure, but I kind of like keeping it together. > That's what you have to do when using the Canvas widget too. On the canvas, setting bindings (the only kind of callback supported) on an item is a separate step from creating the item. >> $widget exists <nodename> > Would this still be useful if node IDs weren't user-supplied? Yes. Donal. |