• 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: Current Selector
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Current Selector


  • Subject: Re: Current Selector
  • From: Jens Bauer <email@hidden>
  • Date: Tue, 7 Jan 2003 23:16:27 +0100

Hi Jake and Ted,

On Tuesday, Jan 7, 2003, at 20:57 Europe/Copenhagen, Jake Repp wrote:

I have the following macros in my current cocoa project:

#define DBG(fmt) printf("[x]: %s:%d: %s: " fmt "\n", (uint)[NSThread currentThread] , __FILE__, __LINE__, __PRETTY_FUNCTION__ );
#define DBG1(fmt, a1) printf("[x]: %s:%d: %s: " fmt "\n", (uint)[NSThread currentThread] , __FILE__ , __LINE__, __PRETTY_FUNCTION__, a1);
{...snip...}
#define DBG7(fmt, a1,a2,a3,a4,a5,a6,a7) printf("[x]: %s:%d: %s: " fmt "\n", (uint)[NSThread currentThread] , __FILE__ , __LINE__, __PRETTY_FUNCTION__, a1,a2,a3,a4,a5,a6,a7);

These can be conditionally compiled out as they add quite a bit of overhead to the application.

Here's a little goodie...

#define DEBUGMSG(fmt, a...) fprintf(stderr, "%s:%d: " fmt, __FILE__, __LINE__, a);

...or just...

#define DEBUGMSG(a...) fprintf(stderr, a);

...to make it even simpler.
Mess with it. ;)


Love,
Jens
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Current Selector (From: Jake Repp <email@hidden>)

  • Prev by Date: Re: Safari
  • Next by Date: Re: Safari
  • Previous by thread: Re: Current Selector
  • Next by thread: Re: Current Selector
  • Index(es):
    • Date
    • Thread