• 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
Re: Trivial NSOpenPanel Question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trivial NSOpenPanel Question...


  • Subject: Re: Trivial NSOpenPanel Question...
  • From: Buddy Kurz <email@hidden>
  • Date: Thu, 2 Oct 2003 23:16:59 -0700

Use nil in place of (NSArray *)fileTypes

result = [panel runModalForDirectory:NSHomeDirectory() file:nil
types:nil];

FYI:My experience with this was if I specified both a directory and file type, nothing could be chosen.



On Thursday, October 2, 2003, at 09:22 PM, Malcolm Sharman wrote:

Hi All

I'm just getting started with cocoa and am working with getting my
NSOpenPanel code to be able to select all files and all folders. But I can't
find a way to make it be able to select all files

...
NSArray *fileTypes = [NSArray arrayWithObject:@"*"];
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setAllowsMultipleSelection:YES];
result = [panel runModalForDirectory:NSHomeDirectory() file:nil
types:fileTypes];
...

The problem is the filetypes array I'm sure, but I can't find in the docs
anywhere how to let the user choose any file, can anyone help out?

Malcolm
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Trivial NSOpenPanel Question... (From: Malcolm Sharman <email@hidden>)

  • Prev by Date: Trivial NSOpenPanel Question...
  • Next by Date: strange problem with NSOutlineView
  • Previous by thread: Trivial NSOpenPanel Question...
  • Next by thread: strange problem with NSOutlineView
  • Index(es):
    • Date
    • Thread