NSPopover:类不可用(Mac OS X 10.7 之前的版本上的 NSPopover)
我想更新我的应用程序并仅切换到 Lion,因为我正在使用新的 NSPopover 类。我将部署目标和基础 SDK 设置为 10.7,但仍然收到错误消息:
NSPopover:类不可用(Mac OS X 10.7 之前的版本上的 NSPopover)
我还设置了 XIB,其中我' m 使用 NSPopover 到 Interface Builder 4.1 及其 SDK 到 10.7。我做错了什么?
编辑:我忘了提及该项目已成功构建,并且可以与弹出窗口一起运行并正常工作!只有那个烦人的错误不断出现。不知道会不会影响提交到App Store…
I want to update my App and switch to Lion only, since I'm using the new NSPopover class. I set my deployment target and the base SDK to 10.7 but I'm still getting the error message:
NSPopover: Class Unavailable (NSPopover on Mac OS X versions prior to 10.7)
I also set the XIB, where I'm using NSPopover to Interface Builder 4.1 and its SDK to 10.7. What am I doing wrong?
Edit: I forgot to mention that the project successfully builds and it runs and works fine with the popover! There is only that annoying Error which is showing up constantly. I don't know if it affects the submission to the App Store…
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我无法复制您遇到的问题。如果我创建一个包含弹出窗口的 xib 文件,然后在界面生成器中将该 xib 的部署设置设置为 10.6,我会得到与您相同的错误。当我将其更改为 10.7 或 Project SDK 版本时,它消失了。
这种情况要么发生在全新项目中,要么发生在我使用 Xcode 中出现的选项挖掘并“现代化”的旧项目中。
我尝试更改项目中的所有部署目标,但除了界面生成器中的设置之外,实际上没有任何东西会导致错误出现。
您可能值得在文本编辑器中打开有问题的 xib 文件并查找以下内容:
如果这是不同的值或者重复或丢失,则可能是您的问题。
如果您有多个 xib 本地化版本,则需要更改所有版本中的设置。
如果做不到这一点,我认为您所能做的就是将 xib 的内容复制到一个新文件中,这可能会也可能不会是一个巨大的痛苦,具体取决于它的复杂程度。
我希望其中一些有所帮助,我想这是一个非常令人沮丧的问题。哦,另外,如果您的应用程序仅支持 Lion,您可以将架构设置为 64 位。
I can't replicate the problem you are getting. If I create a xib file with a popover in it, then set the Deployment setting of that xib in interface builder to 10.6, I get the same error as you. When I change it to either 10.7 or the Project SDK version, it disappears.
This happens either with a brand new project or an old one that I dug out and "modernised" using the options that come up in Xcode.
I have tried changing all of the deployment targets in the project but nothing actually makes the error come up except for the setting in interface builder.
It might be worth you opening the offending xib file in a text editor and looking for the following:
If this is a different value or it is repeated or missing, that may be your problem.
If you have multiple localised versions of the xib, you will need to change the setting in all versions.
Failing that, I think all you can do is copy out the contents of the xib into a new file, which may or may not be a massive pain depending on how complicated it is.
I hope some of this helps, I imagine this is a very frustrating problem. Oh, also, if your app is Lion-only, you can set the architecture to 64 bit.