[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: passing pointers to classes
From: |
ludo |
Subject: |
Re: passing pointers to classes |
Date: |
Tue, 5 Aug 1997 04:38:01 -0600 |
> I know that the pointer to the object is OK since I can send messages to it.
>
> In the TestSwarm class I have a method:
> -(void)setLightModel: (id) l { lightModel = l; return ; }
>
> so that I can call a method such as:
>
> [lightModel getIrradiance];
>
> Trouble is that I get the following error:
> POModel.m:665: warning: cannot find method.
> POModel.m:665: warning: return type for `getLightSpace' defaults to id
I solve this problem generally by importing the header file in which LightModel
is defined. I also think (as Ken did) that you haven't declared the function
yet, importing the header should do just that.
>
> When I print the id for lightSpace and theLightSwarm, which should be the
> same, I get different answers.
>
But then (well, in any sense) I don't understand this, but do the importing
anyway (if you haven't already :-| )
Ludo.
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
==================================