• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Highly Newbie Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Highly Newbie Question (From: Rod Kirkpatrick <email@hidden>)

  • Prev by Date: Re: "Default" Value In Object
  • Next by Date: Re: NSTextTable/NSDrawer bug?
  • Previous by thread: Re: Highly Newbie Question
  • Next by thread: Re: Highly Newbie Question
  • Index(es):
    • Date
    • Thread