| Computers Forum Index » Computer Languages (Objective-C) » Dot syntax again --- correct usage... |
|
Page 1 of 1 |
|
| Author |
Message |
| Linda... |
Posted: Sun Aug 02, 2009 3:13 am |
|
|
|
Guest
|
I am watching Dudney's screencasts for Objective C.
In Lesson 2, in the Movie_Player.m file I tried using the dot syntax
on this
Instead of :
[movie setGrossSales: salesNumber];
I tried :
movie.setGrossSales = salesNumber;
I get the error:
"error: request for member 'setGrossSales' in something not a
structure or a union."
I obviously am doing something wrong and am misunderstanding where I
can use the dot syntax.
The line under that, I have
salesNumber.release; and this does not generate an error
movie.play;
and
movie.release;
both work fine as well.
Can you speak to my misuse of the dot syntax?
Thank you,
Linda |
|
|
| Back to top |
|
|
|
| Linda... |
Posted: Sun Aug 02, 2009 3:36 am |
|
|
|
Guest
|
Quote: movie.setGrossSales = salesNumber;
Figured it out. It should have been:
movie.grossSales = salesNumber and not "setGrossSales"
Thanks anyway,
Linda |
|
|
| Back to top |
|
|
|
|