[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: selectors in Java
From: |
Juan A Rodriguez |
Subject: |
Re: selectors in Java |
Date: |
Wed, 15 Dec 1999 21:53:53 -0500 |
>>>>> "JR" == Juan A Rodriguez <address@hidden> writes:
JR> Concerning the problem with selectors, there is any
JR> alternative way instead of using at$createActionTo$message over a
JR> Schedule?
>Yes, but it isn't in 2.0.1. You say that you get an exception when
>you request a Selector. I thought that my example duplicated that
>(multi-argument) usage. Is that not the same as your code?
Your example worked for me also.
The crash rises when invoking at$createActionTo$message for a given shedule.
Thus, say that I define:
Schedule modelSchedule = new ScheduleImpl(getZone(),true);
if I make the following call:
modelSchedule.at$createActionTo$message(time,agent,
new Selector(agent.getClass(),"anyMethodOfAgent"));
(where time is some long value and agent is an object of type Agent)
this works fine and the method is called.
The problem is when at$..... is called for a method with arguments like:
modelSchedule.at$createActionTo$message(time,agent,
new
Selector(agent.getClass(),"anotherMethodOfAgent",(Object)arg1,(Object)arg2))
Then you get the message the run-time error: Could not fin Java method, etc,
etc.
First I though that I was using wrongly the call, but it works for methods for
the same object that do no have arguments. So I'm confused.
I don't know whether it it is a bug of java-swarm or the bug is mine. Since the
problem found for histograms that you solved for us we've written a lot of code
and no problems have been found so far (your reply made us understand how
java-swarm was organised), but right now we are blocked with this thing which
prevents us from ensembling the whole thing into a simulation.
Lots of thanks Marcus.
Juan.
==================================
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.
- Re: swarm and database, (continued)
Re: swarm and database, david ROBIN, 1999/12/14
Re: swarm and database, Juan A Rodriguez, 1999/12/14
- Re: swarm and database, Marcus G. Daniels, 1999/12/14
- Re: swarm and database, Juan A Rodriguez, 1999/12/15
- selectors in Java, Marcus G. Daniels, 1999/12/15
- Re: selectors in Java, Juan A Rodriguez, 1999/12/15
- Re: selectors in Java, Juan A Rodriguez, 1999/12/15
- Re: selectors in Java, Marcus G. Daniels, 1999/12/15
- Re: selectors in Java,
Juan A Rodriguez <=
- Re: selectors in Java, Marcus G. Daniels, 1999/12/16
- Re: selectors in Java, Juan A Rodriguez, 1999/12/16
- Re: selectors in Java, Marcus G. Daniels, 1999/12/16
- Re: selectors in Java, Juan A Rodriguez, 1999/12/16
Re: swarm and database, david ROBIN, 1999/12/15