作者:hjalshj | 来源:互联网 | 2023-08-10 19:07
Ihaveasmallproblemrightnow.IwanttoexecuteamethodwhentheEnterkeyispressedinaNSTe
I have a small problem right now. I want to execute a method when the Enter key is pressed in a NSTextField. The user should be able to enter his data and a calculation method should be executed as soon as he hits the enter key.
我现在有一个小问题。我想在NSTextField中按下Enter键时执行一个方法。用户应该能够输入他的数据,并且一旦他按下回车键就应该执行计算方法。
8 个解决方案