Re: NSTableView and check boxes (for the hundredth time)
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.