On Oct 9, 2009, at 2:30 AM, Graham Cox wrote:
In init and dealloc, it is usual & recommended to access the ivar
directly - not because self isn't defined (it is), but because at
those times you are usually only concerned with setting the ivar's
initial value (possibly to an object), or rel
Am 09.10.2009 um 13:32 schrieb Graham Cox :
In the first case, interested observers using KVO to track changes
to will get automatically notified, and any subclasses that
have overridden -setIvar: or -ivar also get called as they should.
Got it :-)
As always your feedback is simply pricel
On 09/10/2009, at 10:14 PM, Matthias Arndt wrote:
[self setIvar:[self ivar] + 1];
instead of
iVar++;
looks a bit confusing to me.
Maybe confusing, but the two are not necessarily equivalent. In the
second case, you are merely incrementing the ivar. No-one else would
know anythin
Am 09.10.2009 um 11:30 schrieb Graham Cox:
In init and dealloc, it is usual & recommended to access the ivar
directly - not because self isn't defined (it is), but because at
those times you are usually only concerned with setting the ivar's
initial value (possibly to an object), or releasi
On 09/10/2009, at 8:01 PM, Matthias Arndt wrote:
While restructuring some old classes I'm uncertain about the
preferred way to access instance variables within their own instance:
I tend to defines all these variables as properties and use their
implicit getters / setters, but ...
1. ) .
While restructuring some old classes I'm uncertain about the preferred
way to access instance variables within their own instance:
I tend to defines all these variables as properties and use their
implicit getters / setters, but ...
1. ) ... in the designated initializer I have to access th