Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: beginner obj-c question




On Apr 04, 2008, at 09:32 , Baiss Eric Magnusson wrote:

In trying to learn obj-c I decided to factor the button code from HelloWorldClassic, the factored code compiles ok but the call is flagged.

Could someone tell me how the call should be?

- (UIButton *)makeButton: (NSString *)bkgrdImage: (NSString *)btnName {
...
return button;
}


UIButton *button = self makeButton[ (NSString *)@"Button.png": (NSString *)@"Login" ];


I think you want:

UIButton *button = [self makeButton:@"Button.png" bkgrdImage: @"Login" ];

Cheers,
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/objc-language/email@hidden

This email sent to email@hidden
References: 
 >beginner obj-c question (From: Baiss Eric Magnusson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.