[Lazarus] Treeview example(s) needed

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Jan 27 11:27:03 CET 2016


On Wed, 27 Jan 2016 06:01:24 +0100
"Joe Shepherd" <joe.shepherd at cyberservices.com> wrote:

>[...]
>        newnode := tv.items.addchild(nil, 'A');
>        newnode := tv.items.addchild(nil, 'B');
>        newnode := tv.items.addchild(newnode, 'B1');
>        newnode := tv.items.addchild(newnode, 'B12');
>        newnode := tv.items.addchild(newnode, 'B123');      
>[...]
> If the treeview option tvoAutoExpand is True, I get the whole tree and can click about the tree and select nodes. But if tvoAutoExpand is False, the tree is (correctly) drawn collapsed, and  clicking to expand (eg node B), or on a node with no children (eg Node A) both result in a SigSegV in include/treeview.inc at line 1590 which is the indicated line here:

Clicking on nodes should not create AV, unless you have some more code
than just the above 5 lines.
The method GetLevel is not called by the LCL, so I guess you use it
somewhere.
Use the debugger to create a backtrace of the AV to find out what
causes the AV.

Mattias




More information about the Lazarus mailing list