[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: makeProbeAtX$Y - Can I create a custom probe map for an object?
From: |
Paul E Johnson |
Subject: |
Re: makeProbeAtX$Y - Can I create a custom probe map for an object? |
Date: |
Thu, 06 Jun 2002 14:00:16 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020516 |
Hey, Geoff:
You can control what things appear in a probe. Take a look at the
swarmapps for objective C, in the heatbugs, for example. Or, I suppose,
look in jheatbugs, to see the same. THat part is pretty easy.
The source code for all swarm is available. Look on the ftp server and
there is a directory "src" and if you are using a newish swarm, it will
be under "testing". Now I'm running:
ftp://ftp.swarm.org/pub/swarm/src/testing/swarm-2002-05-14.tar.gz
I'm sorry to say I don't have more documentation to give about how the
jni works, but I think there are lots of Java books for that.
Geoff Wright wrote:
> Hi.
>
> In the jSwarm tutorial there is an application called SimpleObserverBug3.
> One
> of the features of this app is that we are introduced how to send a message
> through the ZoomRaster object to an Object2dDisplay object. That is, when I
> click on a bug on the raster display window, a probe map for the bug appears.
>
>
> According the jSwarm tutorial, it creates a COMPLETE probe map.
>
> Question 1: Is there any way to customize this probe map?
>
> For example, I have created a Commodity class which has fields: type and
> quantity. Each bug in my model can have one or multiple instances of this
> class. (I am trying to think in OOP terms, so please correct me if this
> sounds wrong). That is, the bug can have a productionCommodity of type 2 and
> quantity 5. Now, when I probe the bug, I get something like this:
>
> xPos = 42
> yPos = 37
> productionCommodity - Commodity
> ...
> ...
>
> I would like to be able to probe the bug and get something like this:
>
> xPos = 42
> yPos = 37
> productionCommodity: type = 2; quantity = 5
> ...
> ...
>
> Is it possible to do something like this?
>
> Also, I am using swarm.jar which gives me access to a number of compiled
> swarm
> objects. My understanding is that these objects are written in ObjectiveC
> and there is some sort of interface (JNI) that allows java apps access to
> these objects. Where can I learn more about this and can someone point me to
> where I would find the source code for these swarm objects?
>
> Thank you.
> geoff
>
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66044-3177 FAX: (785) 864-5700
==================================
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.