On 29/07/2009, at 12:52 PM, Agha Khan wrote:

Hi:
I have a struct
@interface PngButton : UIButton
{
@public
        bool OffPos;
        CGPoint horizontalLoc;
        CGPoint verticalLoc;
}
@property (assign) bool OffPos;
@property (assign) CGPoint horizontalLoc;
@property (assign) CGPoint verticalLoc;
@end

No, you have an Objective-C class.

PngButton* pPngButton = [PngButton buttonWithType:UIButtonTypeInfoDark]; [pPngButton setFrame:CGRectMake(screenRect.size.width - 70.0, 50.0, 36, 36)]; // No problem

pPngButton.verticalLoc = CGPointMake((bVerticalDisplay == YES) ? 250 : 410, 50.0);

I get an error
error: lvalue required as left operand of assignment

Why it is not working? I shouldn't get this error.
Any help will be very much appreciated.

Do you get any warnings?

Try this and see what happens:
pPngButton.verticalLoc = CGPointMake((bVerticalDisplay == YES ? 250.0 : 410.0), 50.0);

Kiel

_______________________________________________

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

Reply via email to