Re: Documents and "Created with:"
Re: Documents and "Created with:"
- Subject: Re: Documents and "Created with:"
- From: Ali Ozer <email@hidden>
- Date: Fri, 15 Feb 2002 15:57:36 -0800
The type info is declared in the Info.plist, and made more
human-readable (and localized) in InfoPlist.strings. Now you mention you
already do this; so I am not sure what's going on. Perhaps your app
isn't known to the system yet? Of your documents actually don't have
the type info your declared? (The type info comes from the file
extension and/or Mac OS type attached to the document.)
As an example you might want to see how the TextEdit example
(/Developer/Examples/AppKit/TextEdit) does this; it declares the
document types in Application Settings and localizes them in
InfoPlist.strings. (This latter is not necessary for the document type
to show up, but a good idea.)
The creator info field displays the app with the same signature as the
Mac OS creator code in document; if your documents don't have creator
codes, it's OK for this field to say "Not Available." Do not put
creator codes on your documents just to satisfy this field; do it only
if you wish to have creator codes. To write a creator code in NSDocument
app, you would override -[NSDocument
fileAttributesToWriteToFile:ofType:saveOperation:] and use NSFileManager.
Ali
Begin forwarded message:
>
From: Darrin Filer <email@hidden>
>
Date: Fri Feb 15, 2002 01:19:38 PM US/Pacific
>
To: email@hidden
>
Subject: Documents and "Created with:"
>
>
What is the preferred method of setting a Document's "Type:" and
>
"Created With:" strings shown in the finder's Show Info panel?
>
>
My app properly reads in files of the appropriate type and grays out
>
ones of other types. However, when I go to save a file via
>
- (NSData *)dataRepresentationOfType:(NSString *)aType
>
the written file is of Type: Document and Created with: Not available
>
>
None of the other NSDocument saving methods are overridden and my
>
target has its Document Type information set in PB. I've even tried
>
setting the file's type with NSDocument's setFileType: method.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.