swarm-support
[Top][All Lists]
Advanced

[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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]