From Kochan's book, an example ( barebones)
In the addresscard's implementation
From advice I have received here before, I am assuming, perhaps as I incorrectly understood the advice that invoking "name" in the encodeWithCoder method, **directly** uses name, as opposed to using the self.name invocation ( and therefore the accessor).
Now, if this is true, what is the best practice here. When would I use "self" vs what what I have written above?
Thanks as always
Code:
@interface AddressCard:NSObj...... <NSCopying>
{
NSSTring * name;
}
@property ( copy, nonatomic) NSString *name;
In the addresscard's implementation
Code:
-(void) encodeWithCoder: (NSCoder *) encoder
{
[encoder encodeObject: name forKey........]
From advice I have received here before, I am assuming, perhaps as I incorrectly understood the advice that invoking "name" in the encodeWithCoder method, **directly** uses name, as opposed to using the self.name invocation ( and therefore the accessor).
Now, if this is true, what is the best practice here. When would I use "self" vs what what I have written above?
Thanks as always