• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSOutlineView not releasing expanded items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: textShouldNotEvenThinkAboutEndEditingIfItKnowsWhatIsGoodForIt
  • Next by Date: Legality of using Apple resources / icons?
  • Previous by thread: commitEditing not working with NSTextView
  • Next by thread: Legality of using Apple resources / icons?
  • Index(es):
    • Date
    • Thread