FROM : malcom
DATE : Thu Jul 20 16:11:02 2006
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
DATE : Thu Jul 20 16:11:02 2006
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
| Related mails | Author | Date |
|---|---|---|
| malcom | Jul 20, 16:11 | |
| Adam Knight | Jul 21, 06:51 |






Cocoa mail archive

