• 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: How to get an NSWindow from an NSDocument?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get an NSWindow from an NSDocument?


  • Subject: Re: How to get an NSWindow from an NSDocument?
  • From: mmalcolm crawford <email@hidden>
  • Date: Mon, 23 May 2005 17:30:10 -0700


On May 23, 2005, at 1:55 PM, Scott Ellsworth wrote:

The following code is part of a Core Data app that can also read and write "Tab Delimited Sector" and "Sector" files, but since those are lossy, I want an 'untitled' window to show up when you open one.

- (BOOL)readFromURL:(NSURL *)absoluteURL ofType:(NSString *) typeName error:(NSError **)outError{


Modulo my gaffe regarding file wrappers, this seems like an "unusual" approach to take -- assuming you're subclassing NSPersistentDocument?


You almost certainly should be overriding - (BOOL) configurePersistentStoreCoordinatorForURL:(NSURL *)url ofType: (NSString *)fileType error:(NSError **)error (and - (id)initWithType: (NSString *)type error:(NSError **)error) and setting up an in-memory store...

mmalc

_______________________________________________
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


  • Follow-Ups:
    • Re: How to get an NSWindow from an NSDocument?
      • From: Scott Ellsworth <email@hidden>
References: 
 >How to get an NSWindow from an NSDocument? (From: "Theodore H. Smith" <email@hidden>)
 >Re: How to get an NSWindow from an NSDocument? (From: Scott Ellsworth <email@hidden>)

  • Prev by Date: Re: Persistent Stores and Packages ...
  • Next by Date: Re: Subclassing NSManagedObject issue [solved - kinda]
  • Previous by thread: Re: How to get an NSWindow from an NSDocument?
  • Next by thread: Re: How to get an NSWindow from an NSDocument?
  • Index(es):
    • Date
    • Thread