开发者

NSMenuItem Hidden binding issue

I have an NSMenuItem which I have bound to an NSUserDefaults boolean value in IB.

When the variable bMenuHidden is true, I would like my NSMenuItem to be hidden, and vice versa. This works as expected under Snow Leopard. However, Leopard struggles in some cases. In particular: my NSMenuItem is visible upon first launching the application, regardless of the value of bMenuHidden. I've verified via Property List Editor that the value is present, has a Boolean type, and is set to true.

Admittedly, I don't have much experience with 'placeholder' values (the Apple docu开发者_StackOverflow中文版mentation is a little confusing on the matter), but I've set everything to default to Yes (hide the menu in these cases, as it's better to be safe than sorry):

What am I doing wrong?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜