• 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
Conversion from object to NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Conversion from object to NSString


  • Subject: Conversion from object to NSString
  • From: John Cebasek <email@hidden>
  • Date: Thu, 27 Jan 2005 09:52:31 -0500

Hi All:

I've got an NSArray that gets populated with a bunch of Strings. If later on, I want to get back to the strings, I do:

int nIndex = [tokenList_ indexOfSelectedItem];
id anObject = [serialNumberArray objectAtIndex:nIndex];

So, I thought I'd try to get it back into a readable form with (the length = 100 is just a guess):

NSMutableString *serialNumberString = [[NSString alloc] initWithBytes:anObject length:100];

But that doesn't work. So how does on get from an object to a NSString?

Thanks very much


John
 _______________________________________________
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

  • Follow-Ups:
    • Re: Conversion from object to NSString
      • From: James Bucanek <email@hidden>
  • Prev by Date: Re: Database
  • Next by Date: Re: Conversion from object to NSString
  • Previous by thread: Highlightcolor when table isn't active
  • Next by thread: Re: Conversion from object to NSString
  • Index(es):
    • Date
    • Thread