允许NSOpenPanel中除了一个以外的所有文件类型 [英] Allow all files type except one in NSOpenPanel
本文介绍了允许NSOpenPanel中除了一个以外的所有文件类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将除.newtype之外的所有文件类型传递给NSOpenPanel实例?
解决方案<提供一个委托来处理
NSOpenSavePanelDelegate
protocol panel:shouldEnableURL:
方法。 my application create a "new" type (extension) of file, let say its ".newtype", so when i want to browse files with NSOpenPanel to create it, this type of files have to be not selectable.
how can i pass ALL files type except ".newtype" to the NSOpenPanel instance ?
解决方案
Provide a delegate that handles the NSOpenSavePanelDelegate
protocol panel:shouldEnableURL:
method.
这篇关于允许NSOpenPanel中除了一个以外的所有文件类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文