Welcome, Guest. Please login or register.
Did you miss your activation email?
April 30, 2017, 03:34:26 PM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Programming in Objective-C, 4th edition
| |-+ Chapter 7
| | |-+ Synthesized setter requires an uppercase 1st character?
Pages: [1] Go Down
Author Topic: Synthesized setter requires an uppercase 1st character? (Read 1111 times)
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?

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.


Pages: [1] Go Up
Jump to:

Login with username, password and session length

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 (c) 2009 classroomM.com. All rights reserved.