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

Re: Parameters


  • Subject: Re: Parameters
  • From: Chris Hanson <email@hidden>
  • Date: Fri, 7 Nov 2003 17:13:55 -0600

On Nov 7, 2003, at 4:25 PM, John MacMullin wrote:
#define noRedDisplay NO;

This is your problem. There should be no semi-colon in the #define of noRedDisplay. You're defining a preprocessor macro, which is just a text substitution.

- (bool)setNoRedDisplay
{
return noRedDisplay;
}

This is preprocessed into:

- (bool)setNoRedDisplay
{
return NO;;
}

which is a return statement followed by an empty statement.

Incidentally, for proper Cocoa style a method that begins with "set" should *always* be a compliant Key-Value Coding setter method.

This is important because you will eventually want to start leveraging Key-Value Coding in your application, and KVC imposes specific naming and behavior requirements.

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Outsourcing Vendor Evaluation | Phone: +1-847-372-3955
Custom Mac OS X Development | Fax: +1-847-589-3738
http://bdistributed.com/ | Personal Email: email@hidden
_______________________________________________
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: 
 >Parameters (From: John MacMullin <email@hidden>)

  • Prev by Date: Re: Parameters
  • Next by Date: Re: Parameters
  • Previous by thread: Re: Parameters
  • Next by thread: Re: Parameters
  • Index(es):
    • Date
    • Thread