weird compiler warnings/errors in Xcode 2.0

Member
Posts: 208
Joined: 2005.04
Post: #16
VolganPoet Wrote:Andrew, you might try setting a break point on the call. Since count isn't a selector defined for NSParagraphStyle, you'll need to make one to break on.

Code:
@interface NSParagraphStyle(DBGBP)
- (unsigned) count;
@end

@implementation NSParagraphStyle(DBGBP)
- (unsigned) count
{
    [NSException raise:@"Invalid Selector"
        format:@"NSParagraphStyle does not respond to count"];
}
@end

Set a break point in the new count method, run the debugger, then you'll see where the call came from and hopefully what the bug is. Oh, and delete the category when you're finished.


That's a wicked idea! Unfortunately, it didn't work Sad
The category's count method does get called (it's printing to console fine), but the debugger won't listen to my breakpoint. In fact, I tried adding a few NSLog() statements to the method, then setting a bunch of breakpoints, hoping at least one might work. But alas, no dice. Is there something special about breakpoints in categories which I should be aware of?
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Weird Compiler WARNING... help? Elphaba 1 2,262 Aug 10, 2009 10:51 PM
Last Post: Elphaba
  Curious Compiler Issue? WhatMeWorry 1 2,501 Jan 16, 2007 03:52 PM
Last Post: OneSadCookie
  Weird errors with std::map ermitgilsukaru 8 4,117 Nov 30, 2006 04:10 AM
Last Post: DoG
  Intel Mac -> Many Warnings (deprecated functions) dave05 3 4,619 Sep 6, 2006 03:19 PM
Last Post: aarku
  compiler (pre-processing?) error of SDL project WhatMeWorry 2 2,947 Oct 14, 2005 09:09 PM
Last Post: WhatMeWorry