[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug #3346] NSDocument actions are not reachable
From: |
nobody |
Subject: |
[Bug #3346] NSDocument actions are not reachable |
Date: |
Mon, 28 Apr 2003 03:12:04 -0400 |
=================== BUG #3346: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=3346&group_id=99
Changes by: Stefan Urbanek <urbanek@host.sk>
Date: Mon 04/28/03 at 09:12 (Europe/Bratislava)
------------------ Additional Follow-up Comments ----------------------------
Yes, this is what was done in Ink.app , but it is not the right way. It does
not make sense to have NSWindowController if you have to make document a
delegate of a window. According to apple docs in "Document based applications:
Window controllers and nib files" delegate of window does not have to be used
or it can be set to the window controller.
Actually, those save* and close: methods have to be implemented in
NSDocumentController (not in nswindow controller, because it does not have to
be a delegate of the window) and forwarded to current active document. Attached
is a patch for NSDocumentController. Ignore previous patch.
------------------ Additional Bug Attachment ----------------------------
File name: NSDocumentController.m.patch Size:1 KB
http://savannah.gnu.org/bugs/download.php?group_id=99&bug_id=3346&bug_file_id=416
=================== BUG #3346: FULL BUG SNAPSHOT ===================
Submitted by: stefanu Project: GNUstep
Submitted on: Sun 04/27/03 at 22:06
Category: Gui/AppKit Severity: 5 - Major
Bug Group: Bug Resolution: None
Assigned to: None Status: Open
Summary: NSDocument actions are not reachable
Original Submission: NSDocument actions saveDocument:, saveDocumentAs:,
saveDocumentTo:, close: are not reachable from main menu. I have subclassed
NSDocument and NSWindowController. I had to implement those methods in
NSWindowController subclass and forward them to NSWindowController's document.
I think those methods should be implemented directly in NSWindowController.
Patch is attached (except close:).
Follow-up Comments
*******************
-------------------------------------------------------
Date: Mon 04/28/03 at 09:12 By: stefanu
Yes, this is what was done in Ink.app , but it is not the right way. It does
not make sense to have NSWindowController if you have to make document a
delegate of a window. According to apple docs in "Document based applications:
Window controllers and nib files" delegate of window does not have to be used
or it can be set to the window controller.
Actually, those save* and close: methods have to be implemented in
NSDocumentController (not in nswindow controller, because it does not have to
be a delegate of the window) and forwarded to current active document. Attached
is a patch for NSDocumentController. Ignore previous patch.
-------------------------------------------------------
Date: Sun 04/27/03 at 22:41 By: yjchen
The trick I found is that you have to set the NSDocument as the delegate of
NSWindow. But It doesn't make sense if you have your own NSWindowController.
Anyway, just a comment.
CC list is empty
File Attachments
****************
-------------------------------------------------------
Date: Mon 04/28/03 at 09:12 Name: NSDocumentController.m.patch Size: 1KB
By: stefanu
http://savannah.gnu.org/bugs/download.php?group_id=99&bug_id=3346&bug_file_id=416
-------------------------------------------------------
Date: Sun 04/27/03 at 22:06 Name: NSWindowController.m.patch Size: 0KB By:
stefanu
added save* methods to NSWindowController
http://savannah.gnu.org/bugs/download.php?group_id=99&bug_id=3346&bug_file_id=412
For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=3346&group_id=99