Re: Replacement for openUntitledDocumentOfType:display:?
Re: Replacement for openUntitledDocumentOfType:display:?
- Subject: Re: Replacement for openUntitledDocumentOfType:display:?
- From: Andreas Mayer <email@hidden>
- Date: Sun, 25 Dec 2005 03:23:38 +0100
Am 25.12.2005 um 02:28 Uhr schrieb Jeff Nouwen:
The docs say that NSDocument's -openUntitledDocumentOfType:display:
is deprecated in 10.4, but there's no indication of what it's to be
replaced by.
From the documentation:
"openUntitledDocumentAndDisplay:error:
Creates a new untitled document, presents its user interface if
displayDocument is YES, and returns the document if successful.
- (id)openUntitledDocumentAndDisplay:(BOOL)displayDocument error:
(NSError **)outError
Discussion
If not successful, the method returns nil after setting outError to
point to an NSError that encapsulates the reason why a new untitled
document could not be created.
The default implementation of this method invokes defaultType to
determine the type of new document to create, invokes
makeUntitledDocumentOfType:error: to create it, then invokes
addDocument: to record its opening. If displayDocument is YES, it
then sends the new document makeWindowControllers and showWindows
messages.
For backward binary compatibility with Mac OS X v10.3 and earlier,
the default implementation of this method instead invokes
openUntitledDocumentOfType:display: if it is overridden."
Seems to be a likely candidate, no?
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden