Using NSDocumentController and info.plists
Using NSDocumentController and info.plists
- Subject: Using NSDocumentController and info.plists
- From: Nate Smith <email@hidden>
- Date: Sun, 2 Jan 2005 18:16:55 -0500
Hello all,
I'm slightly confused on how info.plists corresponds to an NSDocument.
For instance, in my info.plists file I have
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>foobz</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>foobitz.icns</string>
<key>CFBundleTypeName</key>
<string>Canvas</string>
<key>CFBundleTypeRole</key>
<string>None</string>
<key>NSDocumentClass</key>
<string>CanvasDocument</string>
</dict>
</array>
In my NSDocumentController subclass under
- (IBAction) newDocument: (id) sender
I have the code:
if ( [ self openUntitledDocumentOfType: @"Canvas" display: YES ] == nil ) {
NSLog( @"nil" );
}
Does the first argument correspond to CFBundleTypeName, or do I have
this completely wrong? In any case, it returns nil. I also tried
putting @"foobz" and @"CanvasDocument" as the first argument, to no
avail. CanvasDocument does exist as a class. Thanks for any help!
Nate
_______________________________________________
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