Amazon.com Widgets Example 8.4
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2013, 09:15:43 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 8 - Inheritance
| | | |-+  Example 8.4
Poll
Question: Example 8.4
Question - 0 (0%)
Question - 0 (0%)
Total Voters: 0

Pages: [1]   Go Down
Print
Author Topic: Example 8.4  (Read 632 times)
diuming
Newbie
*
Posts: 8


Email




« on: June 08, 2009, 02:04:54 AM »

I have a confuse in example 8.4 Why I can access origin method direct using the dot.
--> myRect.origin = myPoint; (Page 170)

thanks
Logged
Avizzv92
Jr. Member
**
Posts: 63


Email




« Reply #1 on: June 08, 2009, 02:31:01 PM »

Page 140 Explains the dot operator, with the example [myFraction numerator] is the same as myFraction.numerator

and if I understand it correctly myRect.origin = myPoint; is same as myPoint = [myRect origin];
« Last Edit: June 08, 2009, 02:33:50 PM by Avizzv92 » Logged
skochan
Administrator
Hero Member
*****
Posts: 3106







« Reply #2 on: June 08, 2009, 03:26:05 PM »

Page 140 Explains the dot operator, with the example [myFraction numerator] is the same as myFraction.numerator

and if I understand it correctly myRect.origin = myPoint; is same as myPoint = [myRect origin];

No.  Please look at the top of p. 141. myRect.origin = myPoint is the same as writing [myRect setOrigin: myPoint]

Cheers,

Steve Kochan
Logged
Avizzv92
Jr. Member
**
Posts: 63


Email




« Reply #3 on: June 08, 2009, 05:33:06 PM »

No.  Please look at the top of p. 141. myRect.origin = myPoint is the same as writing [myRect setOrigin: myPoint]

Cheers,

Steve Kochan

Okay, I see how its set up now. Thanks for correcting me on that!  Smiley
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.