Re: About the mysterious initWithBytes:length:encoding: NSString method
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.