overriding documentForFileName
overriding documentForFileName
- Subject: overriding documentForFileName
- From: Tom Gray <email@hidden>
- Date: Fri, 19 Sep 2003 12:41:54 -0400
Hello,
I need to override NSDocumentControllers documentForFileName:fileName
method so that my subclass of NSDocumentControllers will return a
different document. it is not really clear to me what I should return.
The header files says:
- (id)documentForWindow:(NSWindow *)window;
- (id)documentForFileName:(NSString *)fileName;
// These allow finding the document that corresponds to a window or
file
and the documentation says:
documentForFileName:
- (id)documentForFileName:(NSString *)fileName
Returns the NSDocument object for the file in which the document data
is stored. The fileName argument is a fully qualified path in the file
system. Returns nil if no document can be found.
I guess what I am asking is how do I return an "id" for the document I
want to have returned? Do I instantiate one? (alloc/init)
Tom
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.