Re: NSTableView retain count problem
Re: NSTableView retain count problem
- Subject: Re: NSTableView retain count problem
- From: Kyle Sluder <email@hidden>
- Date: Mon, 23 Nov 2009 20:34:26 -0800
On Mon, Nov 23, 2009 at 7:43 PM, Shane
<email@hidden> wrote:
> // This is the 1st and should be only instance I create.
No, it's not, as evidenced by...
> When I'm viewing the call stack in the debugger, I see that my
> DataViewController's init method is called a second time from the line
> … "NSView *mv = [mvc view]".
You've created an instance in your nib, *and* you're creating one in
code. Specifically, you've got an instance of DataViewControlller
hanging out in the nib that DataViewController is configured to load.
Calling -view results in that nib being loaded, and your second
DataViewController instance unfrozen.
The only place you want DataViewController to live in that nib file is
as the class of File's Owner.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden