Re: Changing name of newly created NSDocument (instead of 'Untitled i')
Re: Changing name of newly created NSDocument (instead of 'Untitled i')
- Subject: Re: Changing name of newly created NSDocument (instead of 'Untitled i')
- From: Kyle Sluder <email@hidden>
- Date: Wed, 13 May 2009 14:40:24 -0400
On Tue, May 12, 2009 at 4:37 PM, Sean McBride <email@hidden> wrote:
> My doc-based application is able to import foreign file formats. I do
> this by creating a new instance of my NSPersistentDocument subclass and
> populate it as needed.
Add another entry to your Info.plist declaring your
NSPersistentDocument subclass as the class for the type you want to
import. Override -readFromURL:ofType:error: to perform importing or
simply call super's implementation based on the type argument. When
importing, set an instance variable flag that your NSWindowController
subclass (provided in -makeWindowControllers) reads in its override of
-windowTitleForDocumentDisplayName:.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden