Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undocumented Foundation selector not recognized?



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Undocumented Foundation selector not recognized? (From: Tom Harrington <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.