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

Re: Strange Errors


  • Subject: Re: Strange Errors
  • From: email@hidden
  • Date: Thu, 29 Nov 2001 16:13:29 -0500

Thanks for getting back to me so fast; I found the problem, which was two {{ instead of {}. The bloody things are _hard_ to see on a Powerbook; I had to print the code out before I found it! Blah. Why didn't the silly compiler note the uneven number of { vs}? Anyway, all eight errors and fourteen warnings vanished posthaste. Reminds me just how stupid these machines really are when all is said and done.

On Thursday, November 29, 2001, at 04:02 PM, Donald Brown wrote:

Two possibilities. First, is the code of setCompanyName within the
implimentation bracket of the m file? Second, is it defined somewhere in an
interface bracket for that class? While it's not always necessary to put a
method in an interface bracket?

If something isn't between:

@implementation myClass
And
@end

you have to use standard c notation, because it's not a class method.

Donald


on 11/29/01 2:47 PM, email@hidden at email@hidden wrote:

Well, it's strange to me at least. I'm getting a bunch of errors on code
that compiled before with zero errors; only difference is that it was a
"document-based" Cocoa app before, and now it's a straight Cocoa app.
Here is one of the errors that make no sense to me:

" `c' undeclared (first use in this function)"--but it is both declared
and used prior to the line the compiler points to! Here is the code:

- (void)setCompanyName : (NSString *) c
{
[c retain] ;
[companyName release] ;
companyName = c; //this is the highlighted line from the compiler
error
}

Yet another error message says:" illegal statement, missing `;' after
`setCompanyName' "
in spite of the fact that no such semi-colon belongs in the method name
which is the line highlighted by the error message.

No doubt this is something simple and I'm just brain-fried. Anyone?

Brian E. Howard
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev

--
Donald Brown
email@hidden
http://www.eamontales.com

We have met the enemy and he is us - Pogo


  • Follow-Ups:
    • A simple request
      • From: Rosyna <email@hidden>
References: 
 >Re: Strange Errors (From: Donald Brown <email@hidden>)

  • Prev by Date: Re: Strange Errors
  • Next by Date: New Feature?
  • Previous by thread: Re: Strange Errors
  • Next by thread: A simple request
  • Index(es):
    • Date
    • Thread