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

RE: "indexed" COM properties in MysterX?



> Along these lines, I had played with an idea which may or may not be
> of
> interest to you: I was curious as to whether it was necessary to
> distinguish
> between COM methods and properties at the Scheme level.  I found that
> with
> some (messily hacked) changes to the MysterX C code, it was possible
> to
> invoke methods and properties using the same function, i.e.
> eliminating the
> distinction between com-invoke and com-get-property, and maybe even
> com-set-property (I've forgotten - I did this a few weeks back).

It could be done, I think, but the distinction between methods and
properties is part of the COM mindset.  It might be confusing to
conflate these ideas in MysterX.
 
> My real goal was to be able to wrap COM objects in procedures so that
> messages could be invoked like (obj 'message), and I was able to get
> that
> working as a proof of concept.  However, I'm not sure if this would be
> considered philosphically compatible with DrScheme's native object
> system,
> which doesn't appear to use this approach.

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.  

You could probably make your system work by memoizing the lists of
procedures and properties given by com-methods and com-get-properties,
respectively, and dispatching on that to call com-invoke and
com-get-property, as appropriate.

Let me know what you come up with.

> > The new code has been exp-tagged.  Although I've tested this feature
> > here, I'd appreciate any additional offsite testing -- COM always
> has
> > surprises.
> 
> I'll check it out.

Great, that'd be useful.

-- Paul