NSPathCell allowedTypes doesn't seem to work

Originator:me
Number:rdar://11313643 Date Originated:24-Apr-2012 04:37 PM
Status:Open Resolved:
Product:Mac OS X Product Version:10.7.3 (11D50)
Classification:Serious Bug Reproducible:Always
 
The documentation for -[NSPathCell allowedTypes] reads:

"An array of strings representing either file extensions or UTIs. Can be nil, the default value, allowing all types, or an empty array, allowing nothing."

(Basically the same in both the header and the "actual" docs.)

However, we have a NSPathControl whose cell's allowedTypes is an array containing just "public.folder", yet I'm allowed to select seemingly any file. As part of sanity-checking this, I set allowedTypes to an empty array, and received:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason '*** File types array cannot be empty'


What do you have against my sanity?

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!