[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Swarm-Support] Selectors
From: |
Marcello |
Subject: |
[Swarm-Support] Selectors |
Date: |
09 Jul 2003 13:04:23 +0200 |
Pardon me the frequency of my questions!
I have a method in a class Agent:
- setPayoff: (float) p {
payoff=p;
return self;
}
Now, in another class, I have a List of Agent called "group". I'd like
to pass through the list and set the payoff as follows:
float pay=10.1;
[group forEach: M(setPayoff:): pay ];
If I do that, I get
gcc: incompatible type for argument 4 of indirect function call
if I set
[group forEach: M(setPayoff:): (id) pay ];
id does not work either,
it only works if :
[group forEach: M(setPayoff:): (int) pay ];
but then pay is always zero.
Any help?
thanks
marcello
--
Marcello Gallucci (Ph.D)
Department of Social Psychology
Free University
Van der Boechorststraat 1
1081 BT Amsterdam (NL)
Tel. +31(0)20 4448846
Fax +31 (0)20 4448921
- [Swarm-Support] Error in install (RH 7.1), Agustin Ramos Fonseca, 2003/07/02
- RE: [Swarm-Support] Error in install (RH 7.1), Agustin Ramos Fonseca, 2003/07/03
- Re: [Swarm-Support] Error in install (RH 7.1), Paul Johnson, 2003/07/04
- [Swarm-Support] binary numbers, Marcello, 2003/07/08
- Re: [Swarm-Support] binary numbers, Russell Standish, 2003/07/08
- Re: [Swarm-Support] binary numbers, Marcello, 2003/07/08
- Re: [Swarm-Support] binary numbers, Russell Standish, 2003/07/08
- [Swarm-Support] Selectors,
Marcello <=
- Re: [Swarm-Support] Selectors, Paul Johnson, 2003/07/09
- Re: [Swarm-Support] Selectors, Marcello, 2003/07/09
- Re: [Swarm-Support] Selectors, Paul Johnson, 2003/07/09
- Re: [Swarm-Support] Selectors, Steve Jackson, 2003/07/09
- Re: [Swarm-Support] binary numbers, Paul Johnson, 2003/07/08