• 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 runModalForTypes: argument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOpenPanel runModalForTypes: argument


  • Subject: NSOpenPanel runModalForTypes: argument
  • From: Kai-Mikael Jää-Aro <email@hidden>
  • Date: Fri, 23 Dec 2005 12:15:04 +0100

In the docs (http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSOpenPanel.htm) it says:
"runModalForDirectory:file:types: ——— types in fileTypes (an NSArray of file extensions and/or HFS file types)"
and
"runModalForTypes:
Invokes the runModalForDirectory:file:types: method, using nil for both the filename and directory arguments. ——— The fileTypes argument is an NSArray containing the extensions of files to be selectable in the browser."



Is it indeed the case that the allowed fileTypes argument is different in the two methods, even though runModalForTypes: seems to just be a wrapper for runModalForDirectory:? Indeed it seems that only file extension strings are valid as arguments, I tried [panel runModalForTypes: [NSArray arrayWithObjects: [NSNumber numberWithUnsignedLong: 'MooV'], nil]] and got the message

2005-12-23 12:13:40.473 MakeRefMovie[17137] *** -[NSCFNumber _getCString:maxLength:encoding:]: selector not recognized [self = 0x374010]
2005-12-23 12:13:40.511 MakeRefMovie[17137] *** -[NSCFNumber _getCString:maxLength:encoding:]: selector not recognized [self = 0x374010]

when running.



--
Kai-Mikael Jää-Aro <email@hidden>
Popwire AB +46 70 202 6494
Årstaängsvägen 19B
SE-117 94 Stockholm
Sweden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: NSOpenPanel runModalForTypes: argument
      • From: j o a r <email@hidden>
  • Prev by Date: Re: KVO one-step listening but two-step notifying?
  • Next by Date: Re: NSOpenPanel runModalForTypes: argument
  • Previous by thread: Re: Spotlight MDQuerySetSearchScope() bug? followup
  • Next by thread: Re: NSOpenPanel runModalForTypes: argument
  • Index(es):
    • Date
    • Thread