• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSLog(@"%@",[NSProxy class]);
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSLog(@"%@",[NSProxy class]); (From: Agent M <email@hidden>)

  • Prev by Date: CGContextShowTextAtPoint upside down
  • Next by Date: Re: CGContextShowTextAtPoint upside down
  • Previous by thread: NSLog(@"%@",[NSProxy class]);
  • Next by thread: Re: NSLog(@"%@",[NSProxy class]);
  • Index(es):
    • Date
    • Thread