• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSOpenPanel -runModalForDirectory:file:types: won't select file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSOpenPanel -runModalForDirectory:file:types: won't select file
      • From: Johan Kool <email@hidden>
  • Prev by Date: Re: Detecting networks programmatically
  • Next by Date: Framework versioning in OS X
  • Previous by thread: Re: Bindings Issue
  • Next by thread: Re: NSOpenPanel -runModalForDirectory:file:types: won't select file
  • Index(es):
    • Date
    • Thread