• 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: assign property behaves differently from simple instance variable???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: assign property behaves differently from simple instance variable???


  • Subject: Re: assign property behaves differently from simple instance variable???
  • From: David Duncan <email@hidden>
  • Date: Tue, 14 Dec 2010 10:06:07 -0800

On Dec 14, 2010, at 10:01 AM, Keary Suska wrote:

> On Dec 13, 2010, at 12:01 PM, Matt Neuburg wrote:
>
>>   self->firstResponder = tf;
>
> Well, the proper syntax is self.firstResponder . Using the deference is probably a back-door way to access the class struct. Unless I misunderstand something....


'self->foo' is equivalent to 'foo' (both are transformed into an appropriate offset into instance storage). self.foo is equivalent to [self foo] or [self setFoo:] depending on context.
--
David Duncan

_______________________________________________

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: 
 >assign property behaves differently from simple instance variable??? (From: Matt Neuburg <email@hidden>)
 >Re: assign property behaves differently from simple instance variable??? (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: assign property behaves differently from simple instance variable???
  • Next by Date: Re: assign property behaves differently from simple instance variable???
  • Previous by thread: Re: assign property behaves differently from simple instance variable???
  • Next by thread: Re: assign property behaves differently from simple instance variable???
  • Index(es):
    • Date
    • Thread