Re: treeview looks like a list not as a tree





On Fri, Jul 24, 2009 at 1:17 AM, anguila <anguila gmail com> wrote:
Yes, in my code was here, sry, I traduced the variables to b more readable.
So the problem still exist, i defined relation with child and parent and doesnt looks like a tree..
Could you try to isolate the code in a small working program that demonstrates the problem? Otherwise it will be very hard for us to find what's going wrong.

Here's how I was once filling a tree:

http://code.google.com/p/xacobeo/source/browse/tags/0.04/lib/Xacobeo/DomModel.pm#90

The important part is to call $child = $model->append($parent); and to keep $child as the parent iter whenn adding it's children. If you fail to keep $child (if it's set to undef) you will be simply adding elements to the top of the tree and creating a flat list.

Perhaps your $iter is always undef?
Â
--
Emmanuel Rodriguez


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]