Amazon.com Widgets page 142 synthesize question
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 19, 2013, 11:18:34 AM
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
|-+  Old Stuff
| |-+  Chapter Study
| | |-+  Chapter 7 - More on Classes
| | | |-+  page 142 synthesize question
Pages: [1]   Go Down
Print
Author Topic: page 142 synthesize question  (Read 650 times)
Mike
Jr. Member
**
Posts: 51


Email




« on: April 12, 2009, 11:39:22 AM »

Hi Steve,

I noticed that the property and synthesize directives have been used in program 7.2. So I wasn't sure why a setTo method would be needed except that you can initialize both at the same time but then do you need to use property and synthesize?


Thanks
Mike

Logged
skochan
Administrator
Hero Member
*****
Posts: 3103







« Reply #1 on: April 12, 2009, 01:01:24 PM »

Mike,

You can only synthesize accessor methods for a single instance variable.  The setTo:over: method in Program 7-2 takes two arguments and seeks to set two instance variables; therefore, it can't be synthesized.

Cheers,

Steve Kochan
Logged
Pages: [1]   Go Up
Print
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.