Reputation: 4974
This is where I call my method (send message):
[db saveSiteData:(UITextField) txtSiteID with:(UITextField) txtSTA and:(UITextField) txtSiteDesc and: (UITextField) txtElev ]
This is the declaration of the method:
- (void) saveSiteData:(UITextField*) txtSiteID STA:(UITextField*) txtSTA desc:(UITextField*) txtSiteDesc elev:(UITextField*) txtElev {
This is the error message I'm getting on the message call:
Used type 'UITextField' where arithmetic or pointer type is required
How do I fix this? (I'm a newbie, learning as fast as I can..) :D
Upvotes: 0
Views: 1818
Reputation: 20410
Just do this:
[db saveSiteData:(UITextField *) txtSiteID STA:(UITextField *) txtSTA desc:(UITextField *) txtSiteDesc elev: (UITextField *) txtElev ]
Upvotes: 2
Reputation: 29767
You need to pass UITextField
objects as parameters:
[db saveSiteData:txtSiteID STA:txtSTA desc:txtSiteDesc elev:txtElev];
And read at least this - http://en.wikipedia.org/wiki/Objective-C
PS. This will be more useful - The Objective-C Programming - Object Messaging
Upvotes: 0