[MacRuby-devel] allowedFileTypes and NSOpenPanel

Laurent Sansonetti lsansonetti at apple.com
Sun Nov 21 17:32:34 PST 2010


Hi Gregoire,

I ran your snippet from the terminal and the panel was only able to select these file types, in my environment.

What version of Mac OS X do you run? It's possible that there is a Cocoa bug somewhere.

Laurent

On Nov 13, 2010, at 5:38 AM, Gregoire LEJEUNE wrote:

> Hi,
> 
> I try to use setAllowedFileTypes with an NSOpenPanel using this code :
> 
> panel = NSOpenPanel.openPanel()
> panel.canChooseFiles = true
> panel.allowedFileTypes = ["graphml", "gml", "xml"]
> result = panel.runModal()
> 
> But it doesn't work. I can chose any type of file.
> 
> If I use the (10.6) deprecated runModalWithTypes, it works... So is it
> me or setAllowedFileTypes which's buggy ?
> 
> Thanks for your help.
> 
> Greg
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20101121/5fda9a4f/attachment.html>


More information about the MacRuby-devel mailing list