Re: Undocumented Foundation selector not recognized?
Re: Undocumented Foundation selector not recognized?
- Subject: Re: Undocumented Foundation selector not recognized?
- From: Prachi Gauriar <email@hidden>
- Date: Mon, 31 Jan 2005 17:20:48 -0500
On Jan 31, 2005, at 3:16 PM, Tom Harrington wrote:
My theory is that this must come from calling some public method that
exists on both NSData and on NSString, and calling it on the NSData
stored as pointer-to-NSString. As I understand it, the ObjC runtime
would call the NSString version of the method, which in turn might
call undocumented internal NSString methods on the NSData.
The Objective-C runtime doesn't really care about what type of pointer
you store an object in... those are just for you (so the compiler can
warn you). The runtime dynamically determines which method to invoke
for a given selector based on an object's isa pointer.
Does that theory seem to make sense? Are there any other likely
causes of this error?
It's likely that you pulled the NSData object out of a dictionary or
other aggregate data structure and used it as an NSString, either
invoking one of NSString's method's directly or using it as an argument
to a method that expects an NSString.
-Prachi
_______________________________________________
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