How to make a custom file format
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