且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

菜单项已启用,但仍显示为灰色

更新时间:2023-01-14 22:54:04

万一有人用谷歌搜索它并从中受益,则声明了'Action'方法而没有:(id)sender参数:

In case somebody might google this out and benefit, 'Action' method was declared without :(id)sender parameter:

-(IBAction) quit;

奇怪的是,NSMenuItem中的setAction方法将其吃掉了,没有抱怨.哦,很好.

Strangely, setAction method in NSMenuItem ate it and didn't complain. Oh well.