[Q] NSAssert and Jaguar
[Q] NSAssert and Jaguar
- Subject: [Q] NSAssert and Jaguar
- From: Mark de Jong <email@hidden>
- Date: Tue, 20 Aug 2002 15:57:52 -0700
I'm trying to compile code using NSAssert with PB 2.0.1
Here's a snippet:
NSMutableArray *list = [NSArray arrayWithObjects:@"1", @"two",
@"the third item", nil];
NSMutableDictionary *stuff = [[NSMutableDictionary alloc] init];
NS_DURING
list = [myDictionary objectForKey:@"list one"];
NSAssert( list == nil, @"list is nil" );
NS_HANDLER
NSLog( @"Exception: %@", localException );
NS_ENDHANDLER
During compilation, I get the following error:
main.m:45: `_cmd' undeclared (first use in this function)
main.m:45: (Each undeclared identifier is reported only once
main.m:45: for each function it appears in.)
main.m:45: `self' undeclared (first use in this function)
and the line pointed to is the "NSAssert..." line.
Any ideas what I'm doing wrong here?
Thanks!
-- Mark
_______________________________________________
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.