Main Page | Report this Page
Computers Forum Index  »  Computer Languages (Objective-C)  »  Dot syntax again --- correct usage...
Page 1 of 1    

Dot syntax again --- correct usage...

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
 
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
 
 
Page 1 of 1    
All times are GMT
The time now is Sat Nov 28, 2009 6:34 am