• 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
Is there a warning for this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is there a warning for this?


  • Subject: Is there a warning for this?
  • From: Brian Bruinewoud <email@hidden>
  • Date: Thu, 24 Dec 2009 19:26:10 +1100

All,

I had this code:

	[[fetchedResultsController sections] count]

Which always returned zero even thought sglite showed entries in the table.
When I put a break point on the getter, nothing happened.

Amazingly, it dawned on me pretty quickly that I needed this:

	[[self.fetchedResultsController sections] count]

(notice the 'self' at the start)

Is there some way to turn on a warning saying 'you are directly accessing an ivar where a (non-trivial) getter/setter exists'?

Thanks._______________________________________________

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:
    • Re: Is there a warning for this?
      • From: Kyle Sluder <email@hidden>
    • Re: Is there a warning for this?
      • From: Alexander Spohr <email@hidden>
  • Prev by Date: Re: Releasing Objects
  • Next by Date: Re: [textView:shouldChangeTextInRanges:replacementStrings:] When does this type of event occur?
  • Previous by thread: Re: NSCollectionView NSArrayController bindings from outer hell
  • Next by thread: Re: Is there a warning for this?
  • Index(es):
    • Date
    • Thread