implementing a Viewer for file type (NOT Editor!)
implementing a Viewer for file type (NOT Editor!)
- Subject: implementing a Viewer for file type (NOT Editor!)
- From: email@hidden
- Date: Tue, 21 Aug 2001 12:27:46 -0600
Hello, you may refer to me as Cocoa Newbie Knowlton :-)
I have checked this list's archives through the beginning of August,
manually (so-to-speak), and not found anything that helps with my
question. Please refer me to a (working!) searchable archive, if you
please. I did try one of the ones mentioned in posts to the list, and
found it to be non-functional:
http://www.mamasam.com/cocoa/
So, my situation is this: I am attempting to construct a Viewer
application, but when I start the app, an "Untitled1" document is
created. I want NSDocument's to be created in my app only for
pre-existing data.
I tried overriding MyDocument's -init to always fail, thinking that
-initWithXYZ are the more appropriate initializers for my case, but
apparently at some depth those all filter down to -init.
I tried also overriding -(BOOL)loadDataRepresentation:ofType: to check
that its data argument is non-nil, but that wasn't the ticket, either.
I'm hoping to avoid having to subclass NSDocumentController, though I'm
starting to think that's the only way to prevent new document creation
actions from succeeding.
Ideas? Thanks in advance.
--Tk!