开发者

I think This is an Error Code, Cocoa Programming

开发者 https://www.devze.com 2023-01-25 11:25 出处:网络
I was trying to make an app for practice. Its basically a greeting app written in Cocoa and Objective-C. It has a textfield that asks for the user name. And a textView that prints out Hello, userName.

I was trying to make an app for practice. Its basically a greeting app written in Cocoa and Objective-C. It has a textfield that asks for the user name. And a textView that prints out Hello, userName. Okay, I got this done with a button that starts the action. When I type in something say Kris. And pressed the button, It came up with something like this

Hello, <NSTextField:0x100223740>

Nothin else

I am not sure what the words in the <> mean开发者_开发技巧...

Thanks in Advance, Kris


your not returning the textviews text.

try:

NSString *helloUser = [NSString stringWithFormat:@"Hello %@!",textView.text];
NSLog(@"OUTPUT:  %@",helloUser);
0

精彩评论

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