开发者

Can't copy or paste text in Cocoa after deleted edit menu item

开发者 https://www.devze.com 2022-12-19 13:36 出处:网络
I can\'t copy or paste any text on nstextfield after deleted edit menu item o开发者_运维知识库n Interface Builder. I\'ve re-added edit menu item but still can\'t. Anyone know how to fix it ?

I can't copy or paste any text on nstextfield after deleted edit menu item o开发者_运维知识库n Interface Builder. I've re-added edit menu item but still can't. Anyone know how to fix it ?

Thanks in advance.


You need to reconnect the menu items to a target. In this case, connecting the selector property of the item to the First Responder's appropriate action method will do the trick.


You need to send the cut:, copy: and paste: messages to the First Responder from the "Sent Action" of the respective menu items.

0

精彩评论

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