How to properly add a document with -addDocument
How to properly add a document with -addDocument
- Subject: How to properly add a document with -addDocument
- From: Hannes Petri <email@hidden>
- Date: Mon, 10 Jul 2006 00:39:04 +0200
Hello,
In my application, a template-chooser is shown when creating a new
document (kind of like the one in Pages).
I want to create my document with an initializer, with the argument
from the template chooser. I use the following code:
(faked class names and arguments)
Template* template = [[Template alloc]
initWithBundleID:@"com.hello.templates.blah"];
Document* document = [[Document alloc] initWithTemplate:template];
[[NSDocumentController sharedDocumentController] addDocument:document];
I thought that this would bring up a nice document, but nothing
happens. What is wrong? Is it possible to create documents this way
at all?
Hannes Petri
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