Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
December 15, 2017, 01:20:29 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
  Print  
Author Topic: Synthesized setter requires an uppercase 1st character?  (Read 1193 times)
peaterk
Newbie
*
Posts: 2


« on: March 24, 2012, 01:46:13 PM »

Maybe I am really misunderstanding this but if seems if I synthesize the setter function for a property called 'a', I must set it by using 'setA:'
'seta:' won't work.

Why is it this way? It seems daft.

Experimenting I see that if the variable is called 'A', I can also use 'setA:'

So what happens if I have two variables called 'a' and 'A'?
It would be poor style to do so but surely not illegal?
How would I set 'a' in that case?

Thanks
Logged
skochan
Administrator
Hero Member
*****
Posts: 3114



« Reply #1 on: March 25, 2012, 01:39:13 PM »

That has to do with the "camelCase" naming convention that's followed by Apple and recommended for Objective-C programmers.  See: http://en.wikipedia.org/wiki/CamelCase.

Cheers,

Steve
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 classroomM.com. All rights reserved.