NSOutlineView not releasing expanded items
NSOutlineView not releasing expanded items
- Subject: NSOutlineView not releasing expanded items
- From: Lorenzo <email@hidden>
- Date: Thu, 02 Dec 2004 18:25:25 +0100
Hi,
in my outlineView, when I quit and release the mainNode object, I can see
that every item of my nodeTree gets released properly. Good.
But this happens only if all the nodes are collapsed. In facts, if some node
is expanded, it and all of its children don't get released.
In order to release all the nodes properly, I have made a trick: before
deallocating the mainNode object I set gQuit to YES and I do this:
- (int)outlineView:(NSOutlineView*)olv numberOfChildrenOfItem:(id)item
{
if (gQuit) return 0;
else return [item numberOfChildren];
}
It works well.
Do you think it is a good manner to solve this problem? Or do you know a
better solution?
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden