Re: Highly Newbie Question
Re: Highly Newbie Question
- Subject: Re: Highly Newbie Question
- From: Andy Lee <email@hidden>
- Date: Sat, 18 Jun 2005 02:36:11 -0400
On Jun 18, 2005, at 1:07 AM, Rod Kirkpatrick wrote:
I can assign sourceStringValue to characterStringValue and display
the result in the appropriate field in the interface.
By going through old posts and shamelessly cribbing I added a
variable of type unichar and got to
c = [sourceStringValue characterAtIndex: 1]; which built OK
How on earth do I get the "c" value back to the interface ??
If I understand what you're asking, you can convert the unichar to an
NSString like this:
characterStringValue = [NSString stringWithCharacters:&c length:1];
(Note that this introduces a memory leak -- you'd probably want to
write a setter method for characterStringValue instead of assigning
directly -- but that's a whole nother topic for you to cover.)
You can plug the string into the characterString field like this:
[characterString setStringValue:characterStringValue];
--Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden