Opening a document from stationery
Opening a document from stationery
- Subject: Opening a document from stationery
- From: Graham Cox <email@hidden>
- Date: Sat, 11 Oct 2008 16:15:11 +1100
I want to implement opening a document from stationery. This opens a
new 'untitled' document but preloaded with the content from the
template file. It's pretty much working using the following code:
NSDocument* newDoc = [[NSDocumentController sharedDocumentController]
openDocumentWithContentsOfURL:url display:YES error:&outError];
[newDoc setFileURL:nil];
But you can see the window title briefly display the original filename
before being set to 'untitled'. To try and fix that I tried passing NO
in the display: parameter, then calling -showWindows after setting the
URL to nil, but that doesn't show anything at all.
So, what's the right way to handle this?
tia,
Graham
_______________________________________________
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