[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Delegate of window in document-base application
From: |
Yen-Ju Chen |
Subject: |
Delegate of window in document-base application |
Date: |
Sat, 12 Apr 2003 15:28:31 -0400 |
Hi,
In Document-base appliction, the relationship is
NSDocumentController (newDocument:, openDocument:, etc.)
|
NSDocument (saveDocument:, saveDocumentTo:, etc)
|
NSWindowController
|
NSWindow
And I notice that *only if* the NSDocument (or subclass) is the delegate
of NSWindow,
the menu "Save...", "Save To..." will be enabled.
If I set NSWindowController as the delegate of NSWindow,
the menu "Save..." won't be enabled.
Is it a corrected behavior ?
That means NSDocument must be the delegate of NSWindow,
and NSWindowController can't be the delegate.
The role of "owner" and "delegate" of window in document-base application
is not very clear.
What's the owner for ? Does it do anything internally,
or just a convenient outlet ?
Yen-Ju
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Delegate of window in document-base application,
Yen-Ju Chen <=