Void values accepted as values in GCC (was Re: IB inspector won't load [Really Solved])
Void values accepted as values in GCC (was Re: IB inspector won't load [Really Solved])
- Subject: Void values accepted as values in GCC (was Re: IB inspector won't load [Really Solved])
- From: Thomas Lachand-Robert <email@hidden>
- Date: Mon, 29 Nov 2004 17:54:02 +0100
Le 29 nov. 04, à 16:16, Ricky Sharp a écrit :
- (void)encodeWithCoder:(NSCoder *)coder
{
if ([super encodeWithCoder:coder]) {
[coder encodeObject:[self myAttribute] forKey:@"MyAttribute"];
}
}
But encodeWithCoder: doesn't have a return value. Thus, none of the
statements in the 'if' are executed.
I have been hit by a similar problem in the past (with no
responsability form Accessorizer). Am I the only to find weird GCC's
behavior in this case? A void value shouldn't be accepted in an if
statement, or in any place where a normal value is required.
Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet à la chose. >> Molière, Tartuffe.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden