On Mon, Nov 23, 2009 at 7:43 PM, Shane
<[email protected]> 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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to