Re: An Event Driven Approach to Modelling Object Behaviour

Paul Burchard ([email protected])
Mon, 8 Aug 94 11:42:51 -0500


Peter Johnson <[email protected]> writes:
> The C like procedure is a subset of the C language
> supporting the following:
...
> It may be desirable to add a "for" loop construct to this
> as well as supporting C like comments. The "comment {
> STRING}" construct is provided to maintain consistency
> with the rest of the language. The same reasoning may be
> applied to the use of "num" and "real" instead of "int"
> and "float". It may be necessary to make variables local
> to a particular action as well as global to the whole
> Event definition. The addition of an array data type may
> also be desirable.

Ouch. Can we avoid reinventing this rather large wheel?
Scripting language design is a difficult and distracting task
that we would do well to factor out of VRML and leave to others.

> Event

Your discussion of events is indeed relevant to the next
stage of VRML where an API for scripting languages needs to
be defined. However, the event spectrum seems rather limited.

Have you looked at Geomview's Gcl command language? It has
a rather clever feature called the "interest" command, which
allows *anything* that can be described with a Gcl command
to be turned into an event. For example,

(interest (delete "my-object"))

will cause Geomview to call back your script whenever an
object named "my-object" is deleted. Alternatively,

(interest (delete *))

will result in a callback whenever any object is deleted.
So in Gcl there is no real need for a separate class of "events".

For more about Gcl, see
<URL:http://www.geom.umn.edu/docs/software/viz/geomview/geomview_toc.html>

--------------------------------------------------------------------
Paul Burchard <[email protected]>
``I'm still learning how to count backwards from infinity...''
--------------------------------------------------------------------