• 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
[Q] NSAssert and Jaguar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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.

  • Follow-Ups:
    • Re: [Q] NSAssert and Jaguar
      • From: Finlay Dobbie <email@hidden>
    • Re: [Q] NSAssert and Jaguar
      • From: Nicholas Riley <email@hidden>
  • Prev by Date: "Building Cocoa Applications" ch. 8
  • Next by Date: Re: [Q] NSAssert and Jaguar
  • Previous by thread: Re: Adding a drawer to a window?
  • Next by thread: Re: [Q] NSAssert and Jaguar
  • Index(es):
    • Date
    • Thread