Re: NSLog(@"%@",[NSProxy class]);
Re: NSLog(@"%@",[NSProxy class]);
- Subject: Re: NSLog(@"%@",[NSProxy class]);
- From: Agent M <email@hidden>
- Date: Fri, 17 Mar 2006 21:56:48 -0500
I did some more digging on why a private method is required to be
implemented in order for objects to be successfully passed to NSLog
(CFLog). Here's the relevant code:
http://cvs.opendarwin.org/cgi-bin/cvsweb.cgi/src/CoreFoundation/
Base.subproj/CFRuntime.c?rev=1.3&content-type=text/x-cvsweb-markup
CFStringRef CFCopyDescription(CFTypeRef cf) {
#if defined(DEBUG)
if (NULL == cf) HALT;
#endif
CFTYPE_OBJC_FUNCDISPATCH0(CFStringRef, cf, "_copyDescription");
...
traced from the heavy-duty function __CFParseFormatSpec in:
http://cvs.opendarwin.org/cgi-bin/cvsweb.cgi/src/CoreFoundation/
String.subproj/CFString.c?rev=1.5&content-type=text/x-cvsweb-markup
This function is called on every ObjC object passed to NSLog() so root
classes that fail to implement it cannot be printed. Anyway, I would
like to point to this as a good example of why open source code is
good.
rdar://4482973 (expected to be flagged as "Expected Behavior")
¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬
AgentM
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