[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Re: [zzdev] Re: Named primitives (was: Re: [zzdev] I cannot compile!)

On Sat, 26 Aug 2000, Benjamin Fallenstein wrote:
> Tuomas Lukka wrote:
> > > P.P.S. Oh yes: Of course scripting engines should subclass ZZCommand so
> > > that scripts can be called as usual UI callbacks. If we change the ZOb
> > > interface a bit, this could also be used for inter-language calls. -b.
> > 
> > How?
> By having a readParams method which takes a number of parameters as well
> as a cell. That is, we pass a hashtable whose keys are structparam
> identifiers and whose values are values for the structparams. readParams
> then first reads the params from the structure (if not null, of course),
> and then reads the params from the hashtable (that way, a param in the
> hashtable can "override" a param in the structure).
> A scripting language can then represent the params in any format it desires.

Actually, not even that much is necessary: the structparams are all
public. The only thing that is needed is to move the init__zob call out of
readparams (or make it a boolean option, so that it's possible to init

Then the code can do *anything* with those parameters. Of course, the idea
of taking them from somewhere as strings does have merit in an
interlingual environment.

Hmm... should ZObs be javabeans as well?

> BTW: With this system, the dir action storing could work as follows:
> - calling the dir action without a direction clones it next to the dir
> action cell
> - calling the cursor move action looks next to the dir action cell for
> an action to execute (just as it does now), and then calls that action,
> overriding the direction structparam.

Sounds reasonable.

AJ, your reaction to these structures?