How do you set the text in an NSTextField?

前端 未结 7 2205
孤城傲影
孤城傲影 2020-12-08 12:39

I\'m trying to set the text in an NSTextField, but the -setStringValue: and -setTitleWithMnemonic: methods are not working. Any ideas?

7条回答
  •  再見小時候
    2020-12-08 13:15

    setStringValue: is the way to do it. You should make sure your outlet is being set properly. (In the debugger, make sure your textfield variable is not null.)

提交回复
热议问题