NSOpenPanel -runModalForDirectory:file:types: won't select file
NSOpenPanel -runModalForDirectory:file:types: won't select file
- Subject: NSOpenPanel -runModalForDirectory:file:types: won't select file
- From: Roland Torres <email@hidden>
- Date: Thu, 19 Apr 2007 12:24:48 -0700
I can't get NSOpenPanel's -runModalForDirectory:file:types: to
preselect a file.
The documentation says:
- (int)runModalForDirectory:(NSString *)absoluteDirectoryPath
file:(NSString *)filename
types:(NSArray *)fileTypes
filename Specifies a particular file in
absoluteDirectoryPath that is
selected when the Open panel is presented to the
user.
The file I specify (using an absolute path) is not preselected,
though the panel does display the correct directory where the file is
located. Neither of these ways work:
[[NSOpenPanel openPanel] runModalForDirectory:nil file:@"/Users/
roland/chem/Hexachlorophene_37b.dat" types:nil];
[[NSOpenPanel openPanel] runModalForDirectory:@"/Users/roland/chem"
file:@"Hexachlorophene_37b.dat" types:nil];
Is this a known issue, or is there something that needs to be set up
in NSOpenPanel before making this call?
Roland
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden