• 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: "remote" binding problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "remote" binding problem


  • Subject: Re: "remote" binding problem
  • From: Graham Cox <email@hidden>
  • Date: Wed, 7 Oct 2009 14:21:57 +1100


On 07/10/2009, at 2:12 PM, David Hirsch wrote:

I would strongly recommend a property accessor for it instead of relying on accessing the ivar directly.

But I can't bind through an accessor, can I? I'm supposed to be able to bind to the ivar, I think.


You bind to properties, not to ivars. Properties are often implemented in terms of ivars, but they are not the same thing conceptually.

You should generally arrange that properties are accessed via accessors. I believe that the ability to have Cocoa automatically "find" a property that is implemented as an ivar is a convenience too far, probably there for historic reasons. If you design classes on the principle that this convenience doesn't exist you'll be better off. Whether this has a bearing on your crash isn't clear however.

Is your document's -init method being called at all? Maybe quizResults is nil or uninitialized at the time that the currentScore property is accessed.

--Graham


_______________________________________________

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


  • Follow-Ups:
    • [Solved] Re: "remote" binding problem
      • From: David Hirsch <email@hidden>
References: 
 >"remote" binding problem (From: David Hirsch <email@hidden>)
 >Re: "remote" binding problem (From: Graham Cox <email@hidden>)
 >Re: "remote" binding problem (From: David Hirsch <email@hidden>)

  • Prev by Date: Re: Suggest reasons for this crash?
  • Next by Date: Re: CoreData async fetch request
  • Previous by thread: Re: "remote" binding problem
  • Next by thread: [Solved] Re: "remote" binding problem
  • Index(es):
    • Date
    • Thread