On Feb 23, 2009, at 12:50 PM, Jon C. Munson II wrote:
I could not, however get this to work (and it may not be possible)
with the
appropriate @class & #import:
(anEntity *)someObject.attribute = @"somevalue";
Is there a way to implement that methodology as well?
I believe the problem here is just that the dot operator has higher
precedence than the typecast operator --- so that your expression gets
parsed as if it were (anEntity *)(someObject.attribute) = ... It
should work if you add parentheses to make it explicit that the
typecast applies to the 'someObject' part of the expression instead of
to the whole 'someObject.attribute' part:
((anEntity*)someObject).attribute = @"somevalue";
_______________________________________________
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 arch...@mail-archive.com