开发者

Is there a way to save a "." file using NSSavePanel without MacOS warning me?

I'm working on a cocoa project. My project uses a preferences menu, and includes the option to save a set of preferences as a "." file (hidden files like .rvmrc or .vimrc). The problem is that after bringing up the NSSavePanel 开发者_运维技巧and clicking Save the system pops up and reminds me that "." is reserved for the system, which isn't very cool.

Is there some way to prevent the OS from firing that prompt?

Thanks!


You can subclass or make a category of NSSavePanel and override

-[NSSavePanel _legalNameCheck:]

AFAIK, checking for the dot name is all that routine does.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜