On Mon, May 12, 2008 at 3:42 PM, Phoenix Draco
<[EMAIL PROTECTED]> wrote:
>
>  Sorry if this is naïve but I have a quick follow up q (to verify that I am
>  understanding ObjC correctly). Is it true that:
>
>  The two styles seem to me to have slightly different execution paths. The
>  first:
>
>  [self.fieldArray addObject:inFoo]
>
>  Would actually invoke the property accessor fieldArray and then send the
>  message addObject: to the returned result, i.e. Its equivalent to:
>
>  [[self getfieldArray] addObject:inFoo]

Correct, except for the fact that the method is called "fieldArray":

"[self.fieldArray addObject:inFoo]" is equivalent to "[[self
fieldArray] addObject:inFoo]" in all respects except for syntax


>  While the second form [fieldArray addObject:inFoo] would directly use the
>  member variable.
>
>  So if you (for some reason) chose to have a more complicated accessor that
>  is not simply backed by an ivar, the former may have some potential side
>  effects, yes?
>
>  Thanks,
>  Phoenix
>
>
>  On 5/12/08 3:19 PM, "Craig Hopson" <[EMAIL PROTECTED]> hollered from the
>  keytops:
>
>
>
>  > Guys,
>  >
>  > I think I've been the victim of some side effect that I cannot track
>  > down. With no other changes, I tried again with each style,
>  > [ self.fieldArray addObject:inFoo ];
>  > [ fieldArray addObject:inFoo ];
>  > replacing all occurrences for each test, and both work - what I would
>  > have expected.
>  >
>  > Thanks for your input.
>  > -Craig
>  > _______________________________________________
>  >
>  > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>  >
>  > 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:
>  > 
> http://lists.apple.com/mailman/options/cocoa-dev/aurora.phoenix.draco%40gmail.
>  > com
>  >
>  > This email sent to [EMAIL PROTECTED]
>
>
>
>
>  _______________________________________________
>
>  Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
>  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:
>  http://lists.apple.com/mailman/options/cocoa-dev/clarkcox3%40gmail.com
>
>  This email sent to [EMAIL PROTECTED]
>



-- 
Clark S. Cox III
[EMAIL PROTECTED]
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to