Getting filename of just opened document...
Getting filename of just opened document...
- Subject: Getting filename of just opened document...
- From: Oliver Cameron <email@hidden>
- Date: Sat, 29 May 2004 22:23:08 +0100
Hi guys,
I'm trying to do something special depending on the format of the file
a user opens. So in openDocument: I try this:
- (void)openDocument:(id)sender
{
[[NSDocumentController sharedDocumentController]
openDocument:self];
NSLog(@"%@", [self fileName]);
if ([[[self fileName] pathExtension]
isEqualToString:@"extension"])
{
// Special stuff goes here
}
}
Now the code builds fine, but when I open a document, the NSLog shows
that fileName is (null). Now, I realize that it may be null because it
doesn't know which fileName you are going to choose. But, fileName does
not appear in the run log until after I've chosen the document. Any
ideas?
Thanks,
Oliver
_______________________________________________
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.