[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Line graph selector with arguments
From: |
LIK MUI |
Subject: |
Re: Line graph selector with arguments |
Date: |
Sat, 10 Apr 1999 00:46:15 EDT |
--------
Marcus, I think the method below will always have the variable
set by setIntVar be "10" -- the last time it was set -- when
getTime gets called. Is that right?
I think the new release's method is both nifty and deranged.
For now, I will try to add a method to the swarm 1.4.1 source,
or do something ugly. If you have better suggestion, please let
me know.
Thanks Marcus.
LM
>
> Sorry, no. Probably the easiest thing to do is munge the object:
>
> int i;
>
> for (i = 0; i < 10; i++)
> {
> [self setIntVar: i];
> [resultGraph createSequence: buf
> withFeedFrom: self
> andSelector: M(getTime)];
> }
>
> Where -getTime looks at what -setIntVar: sets.
>
> Btw, the next release of Swarm will have an feature for creating closures.
>
> This feature will facilitate the implementation of an andClosure:
> variant method. The usage would be something like this:
>
> int i;
> id fa = [[[FArguments createBegin: aZone] addInt: &i] createEnd];
> id fc = [[[FCall createBegin: aZone]
> setArguments: fa]
> setMethod: M(getTime:) inObject: self];
>
> for (i = 0; i < 10; i++)
> [resultGraph createSequence: buf withFeedFrom: self andClosure: fc];
>
> Nifty or deranged? You decide...
>
> ==================================
> 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.
>
==================================
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.