• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
implementing a Viewer for file type (NOT Editor!)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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!


  • Follow-Ups:
    • Re: implementing a Viewer for file type (NOT Editor!)
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: How to get the length of a string?
  • Next by Date: Re: Fsref like primitive
  • Previous by thread: Menu Mud
  • Next by thread: Re: implementing a Viewer for file type (NOT Editor!)
  • Index(es):
    • Date
    • Thread