the filename property of NSOpenPanel is deprecated, what else to use?
This works just fine, but I get a deprecation warning on filename. I haven't found 开发者_StackOverflow社区an alternative though, is there one?
filePath = [[zOpenPanel filename] retain]
filename Returns the absolute pathname of the file currently shown in the panel. (Deprecated in Mac OS X v10.6. Use URL instead.)
URL Returns the absolute pathname of the file currently shown in the panel as a URL.
- (NSURL *)URL
So, I think filePath = [[zOpenPanel URL] retain]
精彩评论