Hey, I'm a newbie to Objective-C, but please help me out here.
What I'm seeing is that Method signatures in Objective-C that take multiple parameters seem inconsistent.
Example:
- (void) sendEmail: (NSString *) toStr
subject:(NSString *) subjectStr
body:(NSString *) bodyStr;
Ok, so here we have 3 "parameters" (at least that's what I'm used to calling them), but 2 of them have "external" names (subject, body) but the first one doesn't!!!!! Isn't there something wrong with that from a consistancy/style point of view??
When we call this method we do it like do it like :
[emailObj sendEmail:@"[email protected]" subject:@"testSub" body:@"this is a test"]
(hopefully I did that right, remember I'm a newbie)
So the subject and the body are clearly marked in the call, but not the "to" address? Seems really wacked to me. Why is that first parameter getting special treatment?