I would advise against that exact approach as there are lower level save methods which can be called without -saveDocument: being used. Have a look through the NSDocument for details on the over -saveā€¦ methods.

On 29 May 2008, at 13:41, Dave Fernandes wrote:

Make the window the first responder in your document's saveDocument method...

- (IBAction)saveDocument:(id)sender
{
        NSWindow* window = [self windowForSheet];
        [window makeFirstResponder:window];
        [super saveDocument:sender];
}

On May 28, 2008, at 11:15 PM, David Carlisle wrote:

If I'm adding text to an NSTextField, then I select Save, somehow the message needs to get to the NSTextField wherever it is that it needs to terminate editing and send its contents to the model before the model is saved. I don't see how I should go about implementing that? Any suggestions are welcome.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/dave.fernandes%40utoronto.ca

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/cocoadev%40mikeabdullah.net

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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