Re: references to controllers in document based applications
Re: references to controllers in document based applications
- Subject: Re: references to controllers in document based applications
- From: Torsten Curdt <email@hidden>
- Date: Sun, 10 Feb 2008 03:55:46 +0100
Hah! Thanks, Kyle
Yeah ...basically because when I call [self close] in my NSDocument
class - nothing happens :)
I really think you're doing something wrong here. I created a new
Cocoa Document-based Application and added a -closeButtonClicked:
action to it, which does nothing but NSLog and [self close]. Then I
dropped an NSButton on my document window and wired it straight to the
File's Owner's -closeButtonClicked: method.
Run the app and click the button, the document (and its window) close.
Perhaps you did something differently? Are you sure that code is
executing at all? Drop a breakpoint on it to see.
Indeed I had a NSLog and the code got executed ...but(!)
I did not use the File's Owner and instead dragged my document into
IB and created and instance. Which (now thinking about it) doesn't
really make much sense ;) ...but it sort of worked - just gave this
weird behavior. Thanks pointing out the "File Owner" wiring - that
helped figure it out.
cheers
--
Torsten
_______________________________________________
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