• 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: CoreData stationary documents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData stationary documents


  • Subject: Re: CoreData stationary documents
  • From: Pierre Bernard <email@hidden>
  • Date: Mon, 10 Apr 2006 15:36:43 +0200

Thanks!

I actually tried that late at night the other day. I believe it worked.

However I abandoned it in favor of this:

- (IBAction)saveDocument:(id)sender
{
	if (templateURL != nil) {
		[super saveDocumentAs:sender];
	}
	else {
		[super saveDocument:sender];
	}
}

I set the templateURL variable in: - (BOOL)readFromURL:(NSURL *) absoluteURL ofType:(NSString *)typeName error:(NSError **)outError

Pierre

On Apr 10, 2006, at 2:46 PM, I. Savant wrote:


I believe you may need to use NSPersistentStoreCoordinator's - migratePersistentStore:toURL:options:withType:error: method, if I'm not mistaken. You'd open the "template" document then migrate its contents to a new persistent store.


  If I *am* mistaken, someone please enlighten me.

--
I.S.


On Apr 8, 2006, at 4:43 PM, Pierre Bernard wrote:

Hi!

I am working on a CoreData document based application. I am trying to treat a select few documents as stationaries/templates.

What I do is that I call [self setFileURL:nil] from readFromURL:absoluteURL ofType:typeName error:outError

All seems well. When saving I am asked for a new location.

Trouble is that upon saving I find an empty file at the target location. Indeed changes were saved to the original stationary.

TIA for your help
Pierre
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden


_______________________________________________ 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
References: 
 >CoreData stationary documents (From: Pierre Bernard <email@hidden>)
 >Re: CoreData stationary documents (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Resizer between views
  • Next by Date: Re: scanf...?
  • Previous by thread: Re: CoreData stationary documents
  • Next by thread: Function definitions
  • Index(es):
    • Date
    • Thread