[MacRuby-devel] allowedFileTypes and NSOpenPanel

Gregoire LEJEUNE gregoire.lejeune at gmail.com
Sat Nov 13 05:38:34 PST 2010


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


More information about the MacRuby-devel mailing list