• 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
How to make a custom file format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to make a custom file format


  • Subject: How to make a custom file format
  • From: malcom <email@hidden>
  • Date: Thu, 20 Jul 2006 16:11:02 +0200

Hello,
I would to add a new file type into my app. It's basically a folder
where I need to read some files. I've tried to add the file format
extensions inside my plist as you can see from this screenshot:

http://img236.imageshack.us/img236/8366/immagine7bb3.png

Unfortunatly If I take a folder and I try to add my fformat suffix the
folder still remain a folder. So I've add a class (ANTFileReader) to
my file format class.
This is the implementation:

@implementation ANTFileReader

+ (NSArray *)readableTypes {
	return [NSArray arrayWithObjects:@"msgnemo",nil];
}

+(NSArray*)writableTypes {
	return [NSArray arrayWithObjects:@"msgnemo",nil];
}

- (BOOL)readFromFileWrapper:(NSFileWrapper *)fileWrapper
ofType:(NSString *)typeName error:(NSError **)outError {
	return YES;
}

@end


It works fine and now the folder is a 'fake-file'. But when I try to launch my app this is the result:

http://img163.imageshack.us/img163/9533/immagine8ql2.png
http://img163.imageshack.us/img163/6748/immagine9lw9.png

What's wrong?  Need I to implement other methods? Thanks
_______________________________________________
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: How to make a custom file format
      • From: Adam Knight <email@hidden>
  • Prev by Date: performSelectorOnMainThread
  • Next by Date: Re: Getting added object with KVO
  • Previous by thread: Re: performSelectorOnMainThread
  • Next by thread: Re: How to make a custom file format
  • Index(es):
    • Date
    • Thread