Doc based app - creating a document
Doc based app - creating a document
- Subject: Doc based app - creating a document
- From: Chris Idou <email@hidden>
- Date: Thu, 31 Jul 2008 21:09:43 -0700 (PDT)
I've got a core-data document based app. I need to programmatically create or open a document at a programmatically chosen location and display it in a window. This is what I tried:
[[NSDocumentController sharedDocumentController] makeDocumentWithContentsOfURL:url ofType:mytype error:&error];
[[NSDocumentController sharedDocumentController] openDocumentWithContentsOfURL:url display:YES error:&error];
This opens a new window, but when I hit command-S to save it says it doesn't know where to save and prompts me, despite me having supplied the URL of where to save it. However the default location it prompts is the correct location.
Then after I save it, I was hoping just the call to openDocumentWithContentsOfURL: would open it again, but that doesn't seem to do anything.
Are there some other APIs I need to be looking at?
_______________________________________________
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