• 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
Re: NSTableView and check boxes (for the hundredth time)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView and check boxes (for the hundredth time)


  • Subject: Re: NSTableView and check boxes (for the hundredth time)
  • From: Vladimir Pilipyuk <email@hidden>
  • Date: Sat, 5 Oct 2002 18:12:37 +0100

I had this precise problem with an NSOutline view - the problem appeared to
be that I was releaseing the NSButtonCell that I used to replace the cell in
the table. You need to store it in the controller class and only release
when you are finnished with the table.

You can release NSButtonCell as soon as NSTableView has retained it in the set method. The choice of using autorelease pool is up to you. I do not see a cause for exception inside the code in question except alloc returned nil and I doubt you can do anything more sophisticated than terminating your application afterwards or preferably crashing it because OS may start having troubles. I would not recommend anyone to blindly rely on autorelease nor release, both are good for the job.

Back to the subject I would suggest to verify that data cells are substituted after the table was loaded. I normally do it inside awakeFromNib of the instance which is loaded in the same nib file with the table view, there is quite a lot of alternative ways.

Sincerely,
Vladimir
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: NSTableView and check boxes (for the hundredth time) (From: Tom Davie <email@hidden>)

  • Prev by Date: Re: Authorization question
  • Next by Date: Lock me tender, lock me true
  • Previous by thread: Re: NSTableView and check boxes (for the hundredth time)
  • Next by thread: Re: [semi-newbie] Message sent to NSWindowController after complete window load
  • Index(es):
    • Date
    • Thread