Skip navigation.
 
mlRe: NSOpenPanel isn't listening to me? I told it to only allow .zip and .xml!
FROM : Matt Neuburg
DATE : Fri Jun 23 21:00:56 2006

On Fri, 23 Jun 2006 10:19:54 -0400, Andy Lee <<email_removed>> said:
>The semantics of -setAllowedFileTypes: is presumably different in the
>two classes.  For NSSavePanel it means "only allow the user to
>*create* files with these extensions."  For NSOpenPanel I would have
>assumed it means "only allow the user to *select* files with these
>extensions," but apparently that is incorrect.


Saying -setAllowedFileTypes: to an NSOpenPanel while the panel is showing
causes no change in what's selectable. Evidently you're supposed to specify
the allowed file types when you start running the panel. Thus it appears
that -setAllowedFileTypes: is useless, which is weird, because in that case,
why does it exist? That, at least, is the conclusion reached during a
discussion of this issue at a different venue (a newsgroup). I myself am
just confused and would like to know how this is supposed to work. I would
think that being able to change the allowed file types while the panel is
open would be useful. m.

--
matt neuburg, phd = <email_removed>, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>

Related mailsAuthorDate
mlRe: NSOpenPanel isn't listening to me? I told it to only allow .zip and .xml! Matt Neuburg Jun 23, 21:00
mlRe: NSOpenPanel isn't listening to me? I told it to only allow .zip and .xml! Andy Lee Jun 25, 17:21