• 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: Problem writing unit tests - "Incompatible types in initialization"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem writing unit tests - "Incompatible types in initialization"


  • Subject: Re: Problem writing unit tests - "Incompatible types in initialization"
  • From: Chris Hanson <email@hidden>
  • Date: Sun, 25 Oct 2009 13:38:02 -0700

On Oct 25, 2009, at 1:08 PM, Ian Piper wrote:

> testConverter = Converter.new;

Dot syntax is for accessing state (properties) of objects, not for invoking behavior.

This should be either

    testConverter = [Converter new];

or

    testConverter = [[Converter alloc] init];

to indicate that it’s invoking behavior rather than accessing state on the Converter class itself.

  — Chris

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Problem writing unit tests - "Incompatible types in initialization" (From: Ian Piper <email@hidden>)

  • Prev by Date: Re: Problem writing unit tests - "Incompatible types in initialization"
  • Next by Date: Re: Crash drawing image
  • Previous by thread: Re: Problem writing unit tests - "Incompatible types in initialization"
  • Next by thread: Is there a cocoa treeview?
  • Index(es):
    • Date
    • Thread