[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
List: forEach: arg1;
From: |
Ludo Pagie |
Subject: |
List: forEach: arg1; |
Date: |
Wed, 5 Mar 1997 13:00:33 +0100 |
Hi all;
I'm having a problem with 'List' (see also mail "list & a method with 3
arguments" of Fri, 18 Oct 1996):
Consider (if you will) the following source:
=================================
-react: (ChemicalModelSwarm*) chemicals{
id metabList; // this is a List
double myarg;
myarg=[uniformDblRand getDoubleWithMin: 0.0 withMax: 1.0];
metabList=[chemicals getMetaboliteList];
[[metabList getFirst] addConcentration:myarg];
[metabList forEach: M(print)];
[metabList forEach: M(addConcentration:) : myarg];
return self;
}
=================================
the (relevant part of the) definition of clas Metabolite (the message receiver)
is as follows:
=================================
@interface Metabolite: Substance {
}
-createEnd;
-print;
-addConcentration: (double) c;
=================================
The compiler only complains about the line
[metabList forEach: M(addConcentration:) : myarg];
with:
>reaction.m: In function `_i_Reaction__react_':
>reaction.m:38: incompatible type for argument 4 of indirect function call
without this line the program compiles (and runs) fine. I guess that the
argument 4 is an argument of one of those (?) run-time function-calls (eg.
"objc_msgSend" in Next Objective C, don't know about Swarms run-time system).
I cannot think of any possibilities anymore, except you of course.
Ludo.
- List: forEach: arg1;,
Ludo Pagie <=
- Re: List: forEach: arg1;, Kevin Crowston, 1997/03/05
- Re: List: forEach: arg1;, Roger M. Burkhart, 1997/03/05
- Re: List: forEach: arg1;, glen e. p. ropella, 1997/03/05
- Re: List: forEach: arg1;, Roger M. Burkhart, 1997/03/05
- Re: List: forEach: arg1;, Kevin Crowston, 1997/03/05