NSOpenPanel question
NSOpenPanel question
- Subject: NSOpenPanel question
- From: Raymund Beyer <email@hidden>
- Date: Mon, 29 Jul 2002 20:23:10 +0200
Hi,
I'm just trying to get the path of a file into my app. I'm using the
following code. The 'openPanel filenames' method should return and
NSArray with pointers to NSString objects that contain the filepath(s).
For some reason I can't get the path copied from the 'fileNames' Array to
the NSString object called 'path'.
Does anyone have an idea why?
Thanks in advance
Ray
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
NSMutableArray *fileTypes;
NSMutableArray *fileNames;
NSString *path;
fileTypes = [NSMutableArray arrayWithCapacity:1];
[fileTypes addObject:@"rtf"];
[openPanel runModalForTypes:fileTypes];
fileNames = [openPanel filenames];
path = [fileNames objectAtIndex: 0];
NSLog (@"\nfileNames:%@\nfileTypes:%@\npath:", fileNames, fileTypes,
path);
---------------------------------
Raymund Beyer
D3, 4
D-68053 Mannheim
Germany
email@hidden
http://www.brainstorm-music.com
http://www.ezee.de
---------------------------------
_______________________________________________
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.