Re: setString question...
Re: setString question...
- Subject: Re: setString question...
- From: Hank Heijink <email@hidden>
- Date: Mon, 5 Feb 2007 13:54:46 -0500
I think it's [textField setStringValue:myText] instead of [textField
setString:myText].
Hank
On Feb 5, 2007, at 1:38 PM, email@hidden wrote:
Hello,
I'm brand new to Cocoa, I have been using RealBasic and AppleScript
Studio
for a long time and have finally decided to learn Cocoa.
OK, so I have created a simple little app which has a button which
set the
contents of a NSTextField to a integer, and this works fine. I even
figured out how to change the color. I just can't seem to figure
out how
to set text in the TextField.
Here is my code I was trying.
Thanks,
tom
- (IBAction)setTextFieldTo:(id)sender
{
// This works
//[textField setIntValue:2];
NSString *myText;
myText = @"Hello World";
[textField setString: myText];
[textField setToolTip: @"Hello Tool Tip!"];
[textField setTextColor: [NSColor greenColor]];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Hank Heijink
www.hankheijink.com
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden