[Gambas-user] BUG with the TreeView's new .item.Reparent()

B Bruen bbruen at ...2308...
Wed May 28 05:12:59 CEST 2014


On Wed, 28 May 2014 03:36:02 +0200
epost at ...3323... wrote:

> In TreeView, if you reparent a key to be a child of a key that has the same 
> name as the key you want to reparent, there's an error message saying: "New 
> parent can not be a child item". Renaming the item I want to reparent avoids 
> the bug...
> 
> - Erik
> 
Erik, 
I am afraid that this doesn't make a great deal of sense to me.  It sounds like you are trying to reparent a tree node as a child of itself? Are we having translation problems here?

- "if you reparent a key" No, we reparent a node (which has a unique key across the whole tree). So, if we presume you want to "move" a node identified by the key "FRED1234" which currently has a parent-key of "MARY2468" ...

- "to be a child of a key" Again, have to presume you mean move node["FRED1234"] to be a child of node["some_key"]

- "that has the same name as the key you want to reparent" sounds like you want to move node["FRED1234"] to be a child of node["FRED1234"]

- If "New parent can not be a child item" is really the error you get, then I can understand the confusion, a better message would be "A node cannot be reparented to be a child of itself".

But I really don't understand the bit about " Renaming the item ... avoids the bug"?

or have I missed the entire point (which is possible :-) )

bruce




More information about the User mailing list