Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OwnsObject, Root properties #9

Open
pyscripter opened this issue Nov 5, 2018 · 1 comment
Open

Add OwnsObject, Root properties #9

pyscripter opened this issue Nov 5, 2018 · 1 comment

Comments

@pyscripter
Copy link

Enhancements:
OwnsObject should work as in other generic collection types. Destroy descendants of TObject.
Root returns the topmost parent of a node.

Maybe also add an event OnNodeDestroy.

@skamradt
Copy link
Contributor

I second these, it would be useful. In my limited use I keep a fixed variable for the root, but I could see where passing a node as a parameter to some general purpose function might take advantage of being able to get to the root without having to recursively back walk the parent nodes.

For the TObject support, maybe having a descendant TObjectNode<T:TObject> that has the OwnsObject and OnNodeDestroy methods would also enforce typing through the constraint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants