Re: Undocumented Foundation selector not recognized?
Re: Undocumented Foundation selector not recognized?
- Subject: Re: Undocumented Foundation selector not recognized?
- From: Tom Harrington <email@hidden>
- Date: Mon, 31 Jan 2005 17:30:09 -0700
On Mon, 31 Jan 2005 17:20:48 -0500, Prachi Gauriar <email@hidden> wrote:
> 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.
OK, then bang goes that theory then. I should have realized that.
> > 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.
That's very possible, because the area I've been able to narrow this
down to does read a fairly large plist. Maybe it's a corrupted plist,
giving me data when I want a string.
--
Tom Harrington
email@hidden
_______________________________________________
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