Skip to content

Walking tree up and GetNodeData #831

Description

@Proman6

Normaly if I want to walk up in tree I do:

while n <> nil do
 n := n.Parent;

But this like can walk over the tree... It's stupid... An now:

while n <> nil do
begin
 vst.GetNodeData(n);
 n := n.Parent;
end;

If I do this for RootNode, ale is ok (GetNodeData return nil and function don't change anything). But what happen next? RootNode still have Parent and GetNodeData for this (it's not a node!) change some propertys like for Node element.

Ok, I can check no n <> nil but n <> vst.RootNode. But component herself don't check this!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions