• 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
Re: Saving, file types, and non-document-based apps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving, file types, and non-document-based apps


  • Subject: Re: Saving, file types, and non-document-based apps
  • From: Yann Bizeul <email@hidden>
  • Date: Wed, 12 Jan 2005 15:04:36 +0100

Ideally, I would like the files to have a custom document icon so it is clear they cam from my application. After messing around with the info.plist and nsfilewrapper most of the day, I just can't figure out what is going on. Am I missing something simple? BBEdit xml files seem to work like this.
The problem is that the Finder does not have more informations than the file extension to decide who belong the document. It seem that .xml files go to Property List Editor.
Personaly, I would try to setup target info, and define the "OS Type" column. This is the old style finder document identification mechanism, and you can setup this attribute according to this sample :


NSString *fullPath = @"/Path/to/your/doc";
NSDictionary *attributes = [[[NSFileManager defaultManager]fileAttributesAtPath:fullPath traverseLink:YES]mutableCopy];
[attributes setObject: [NSNumber numberWithUnsignedLong: 'MyFT'] forKey: NSFileHFSTypeCode];
[[NSFileManager defaultManager]changeFileAttributes:attributes atPath:fullPath];
[attributes release];

I hope that helps

(sorry for the false plain text message which is not, just for colorization :-))
--
Yann Bizeul - yann at tynsoe.org
Please use this e-mail when writing to me.

You can visit my projects at this address :
http://projects.tynsoe.org/
(BuddyPop - GeekTool - SSH Tunnel Manager...)
 _______________________________________________
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

  • Follow-Ups:
    • Re: Saving, file types, and non-document-based apps
      • From: "M. Uli Kusterer" <email@hidden>
References: 
 >Saving, file types, and non-document-based apps (From: Mark Meyer <email@hidden>)

  • Prev by Date: Re: [Newbie] Drag'n drop on doc icon?
  • Next by Date: Re: Any one have pointers/examples on drawing within a column in a table view?
  • Previous by thread: Saving, file types, and non-document-based apps
  • Next by thread: Re: Saving, file types, and non-document-based apps
  • Index(es):
    • Date
    • Thread