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

Re: "indexed" COM properties in MysterX?



Paul Steckler schrieb:
> > > Shriram Krishnamurthi suggested once that we make COM objects behave
> > > just like MzScheme objects.  While that's probably possible
> > technically,
> > > I'm not sure the extra complication is worthwhile.
> >
> > I tried this with CLOS objects on common lisp (corman lisp, not ACL).
> > IMHO it's worth because you get the object hierarchy and their
> > documentation for free.
> > For users it's no complication. I consider it a huge simplification.
> 
> Exactly what did you do?  Does this mean you wrote the support to turn
> COM objects into CLOS objects?

yes, but it is not finished yet. I got out of time and I couldn't debug all 
of the pointers yet.
the API deals only with the typelib. one only has to import the typelib 
(usually in a TLB file) and the CLOS objects will be created on the fly.

> If so, how did you handle COM methods that return COM objects?

not yet. hmm, I see. so we have to keep all class instances in an array or
hash 
to be able to point from this method to the correct object instance. 
but this is only needed when such a method exists, when objects can be
returned. 
you can check this in advance, if this expensive structure is really needed.

Visual Lisp for Autocad has this import TLB feature and we found it superior
to the 
Corman and ACL COM API. Visual Lisp just doesn't support events and true 
objects, only the methods and constants.

my old draft code is at 
  http://xarch.tu-graz.ac.at/autocad/lisp/cormanlisp/src/com-oo.lisp
-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/