• 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: warning: local declaration hides instance variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: warning: local declaration hides instance variable


  • Subject: RE: warning: local declaration hides instance variable
  • From: Jeff Laing <email@hidden>
  • Date: Tue, 4 Sep 2007 09:54:28 +1000

> >> An even better solution would be to rename your instance
> variables
> >> with a standard naming convention that clearly identifies them as
> >> instance variables. Since they're also referred to as member
> >> variables, a lot of people prefix their names with an "m":
>
> Is there a practical reason for people in the Obj-C world to not use
> this? If they prefer a differ convention, then that's fine. But to
> just say they don't normally use one is hardly a good reason to shun
> a potentially beneficial practice.

Depends on how much you like coding methods called:

	-ism_myvar
	-setm_myvar:

etc.  KVC seems to default to property 'x' being implemented as instance
variable 'x' or '_x'

Now, sure, you can row upstream and deliberately make your keypaths
different to your instance variable names. That way lies great
productivity...
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: warning: local declaration hides instance variable
      • From: David Dunham <email@hidden>
  • Prev by Date: Re: Adding Help
  • Next by Date: Re: Adding Help
  • Previous by thread: Re: warning: local declaration hides instance variable
  • Next by thread: Re: warning: local declaration hides instance variable
  • Index(es):
    • Date
    • Thread