FROM : Hannes Petri
DATE : Tue Jul 11 20:12:56 2006
Patric, thanks! That was the solution!
Steven: that link will probably help me alot when implementing the
template sheet! Tanks alot!
/Hannes
On 10 jul 2006, at 00.39, Hannes Petri wrote:
> 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_removed>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
>
DATE : Tue Jul 11 20:12:56 2006
Patric, thanks! That was the solution!
Steven: that link will probably help me alot when implementing the
template sheet! Tanks alot!
/Hannes
On 10 jul 2006, at 00.39, Hannes Petri wrote:
> 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_removed>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
>
| Related mails | Author | Date |
|---|---|---|
| Hannes Petri | Jul 10, 00:39 | |
| PGM | Jul 10, 05:29 | |
| Steven LeMaire | Jul 11, 03:35 | |
| Hannes Petri | Jul 11, 20:12 |






Cocoa mail archive

