• 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
Re: Opening a file but not associating with NSDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening a file but not associating with NSDocument


  • Subject: Re: Opening a file but not associating with NSDocument
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 20 May 2016 06:48:15 -0700

> On 2016 May 19, at 23:40, Rick Mann <email@hidden> wrote:
>
> By "Reader," do you mean "Viewer?" I see no "Reader" option.

Yes, I remembered the wrong word.  English is so redundant. :)

> Also, what do you mean "have no windows?" I just don't create anything in -makeWindowControllers?

Correct.

> I'm currently doing this. I have the two document types as you described, but both point to the same NSDocument subclass.  In readFromFileWrapper(), if it's the .mfst type, I read the data in that I can, and then:
>
> 	self.fileURL = nil
> 	self.updateChangeCount(.ChangeReadOtherContents)
>
> So far, this does what I would expect (creates a new document with info from the .mfst file, but if I close it, it prompts to Save As).

I’m not sure what you mean by “close it”.  But, no matter, I would have used two different NSDocument subclasses.  Maybe that would prevent this.  Cocoa should then know that you can’t save the .mfst document class, because you’re only a “Viewer”.

> I have yet to write my saving code, so I don't know if this works.

Cocoa should handle that in the usual way.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Opening a file but not associating with NSDocument (From: Rick Mann <email@hidden>)
 >Re: Opening a file but not associating with NSDocument (From: Jerry Krinock <email@hidden>)
 >Re: Opening a file but not associating with NSDocument (From: Rick Mann <email@hidden>)

  • Prev by Date: Need advice on a custom run-loop mode
  • Next by Date: Re: NSSplitViewController contents are shifted at first
  • Previous by thread: Re: Opening a file but not associating with NSDocument
  • Next by thread: Re: Cocoa-dev Digest, Vol 13, Issue 224
  • Index(es):
    • Date
    • Thread