• 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: About the mysterious initWithBytes:length:encoding: NSString method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About the mysterious initWithBytes:length:encoding: NSString method


  • Subject: Re: About the mysterious initWithBytes:length:encoding: NSString method
  • From: Shawn Erickson <email@hidden>
  • Date: Wed, 18 Feb 2004 08:46:16 -0800

On Feb 18, 2004, at 5:37 AM, Stephane Sudre wrote:

How is it possible that you can use this method in 10.2 when:
- it's not in the documentation (it's in the 10.3 documentation)
- it's not in the header (it's in the 10.3 headers)
- it's not seen by class-dump in the Foundation and AppKit library (it's not in 10.3 either).
- it's causing a warning at build time
?

Yet, it works...

Looking at the 10.3 headers it is NOT wrapped by something like...

#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED

... so it likely has always existed but simply was omitting in prior headers (who knows why). This jives with what the documentation states as well (it doesn't put a OS version restriction on it). I bet it was a private method defined in a category on NSString that has now been moved up to public status.

Note if it is not in the header for the OS you are targeting you will get a warning.

I haven't used class-dump myself but try looking for it in a category if the tool breaks out such things.

-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: About the mysterious initWithBytes:length:encoding: NSString method
      • From: Scott Anguish <email@hidden>
    • Re: About the mysterious initWithBytes:length:encoding: NSString method
      • From: Stephane Sudre <email@hidden>
References: 
 >About the mysterious initWithBytes:length:encoding: NSString method (From: Stephane Sudre <email@hidden>)

  • Prev by Date: red black trees
  • Next by Date: iTunes header column and Rows selection
  • Previous by thread: Re: About the mysterious initWithBytes:length:encoding: NSString method
  • Next by thread: Re: About the mysterious initWithBytes:length:encoding: NSString method
  • Index(es):
    • Date
    • Thread