[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about how to make EZGraph do what I want
From: |
Sven N. Thommesen |
Subject: |
Re: Question about how to make EZGraph do what I want |
Date: |
Fri, 21 Aug 1998 16:42:17 -0500 |
At 04:18 PM 8/21/98 -0500, you wrote:
>Hello, everybody.
>
>
>I have an EZGraph that collects information and plots a line for
>each "recruiter" in the "recruiterList". Each line shows the number
>of members in that recruiter's membership (getMembershipLevel). The
>code is attached below.
>
>The problem is that this code executes at time 0, and so when
>recruiters are born and killed, they do not drop out or pop into
>the graph. Life would be nicer for me if they did.
>
>Got an idea what ought to be done?
>
>
>
> stabilityGraph = [EZGraph createBegin: [self getZone]];
> SET_WINDOW_GEOMETRY_RECORD_NAME (stabilityGraph);
> [stabilityGraph setTitle: "Membership"];
> [stabilityGraph setAxisLabelsX: "time" Y: "Total Membership"];
> stabilityGraph = [stabilityGraph createEnd];
>
> for(i=0; i < [[modelSwarm getRecruiterList] getCount]; i++){
> id aRecruiter;
> aRecruiter = [[modelSwarm getRecruiterList] atOffset: i];
>
> [stabilityGraph createSequence: "Membership"
> withFeedFrom: aRecruiter
> andSelector: M(getMembershipLevel)];
> }
Well, later when a recruiter is created I surmise you might be able to
tell stabilityGraph to createSequence for the new recruiter. The code for
EZGraph would allow this, but I don't know if the blt/tk code will allow
adding a line in the graph midstream like that.
To drop a line from the graph you'd have to fiddle with the internals of
EZGraph,
so that looks a little trickier. If there were a method -getSequenceList
available,
you could query that list for the EZSequence object that queries that
particular
recruiter .. or perhaps it would be easier if there were a
deleteSequence:withFeedFrom:andSelector: method that would rip out the
relevant
graph line. Anyhow, I don't see that it's possible at the moment.
Sven
==================================
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.
==================================