Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using NSDocumentController and info.plists



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.