开发者

NSPopover: Class Unavailable (NSPopover on Mac OS X versions prior to 10.7)

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)

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 bu开发者_开发问答ilds 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…

NSPopover: Class Unavailable (NSPopover on Mac OS X versions prior to 10.7)

NSPopover: Class Unavailable (NSPopover on Mac OS X versions prior to 10.7)

NSPopover: Class Unavailable (NSPopover on Mac OS X versions prior to 10.7)


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:

<int key="IBDocument.SystemTarget">1070</int>

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜