• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Using NSDocumentController and info.plists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: GrowlTunes & iTunes 4.7
  • Next by Date: Re: Localization + NSGlobalDomain + AppleMeasurementUnits?
  • Previous by thread: Re: GrowlTunes & iTunes 4.7
  • Next by thread: Invisible characters in NSTextView
  • Index(es):
    • Date
    • Thread