• 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 and finding files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOpenPanel and finding files


  • Subject: NSOpenPanel and finding files
  • From: Gideon King <email@hidden>
  • Date: Mon, 02 Jan 2012 15:52:24 +1000

Hi, I'm trying to use an open panel to open a particular type of file (.nmcset). I create an open panel and run it like this:

NSOpenPanel *openPanel = [NSOpenPanel openPanel];
[openPanel setCanChooseFiles:YES];
[openPanel setCanChooseDirectories:NO];
[openPanel setAllowsMultipleSelection:NO];
[openPanel setTitle:NSLocalizedString(@"Load Color Set", nil)];
[openPanel setAllowedFileTypes:[NSArray arrayWithObjects:@"nmcset", nil]];

if ([openPanel runModal] == NSFileHandlingPanelOKButton) {
    …do stuff…
}

All this works fine, and all the files without that extension are disabled, but in the search field at the top of the open panel, I can't seem to find my files.

I have a file called "fred.nmcset" in my folder. It appears not grayed out in the list, and I can select it and open it just fine.

But, if I type "fred" or "fred.nmcset" or ".nmcset" into the search field, nothing appears in the results. It does show the options after a few seconds of what to search for and I say to search for a file name, but it still doesn't help. Other applications work just fine.

I'm running on 10.7.

Is there something special I need to do to get this to work?


Thanks

Gideon







_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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 and finding files
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Setting ApplePressAndHoldEnabled key for specific application.
  • Next by Date: Re: NSOpenPanel and finding files
  • Previous by thread: Setting ApplePressAndHoldEnabled key for specific application.
  • Next by thread: Re: NSOpenPanel and finding files
  • Index(es):
    • Date
    • Thread