www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - com programming

reply "Miguel Ferreira Simões" <Kobold netcabo.pt> writes:
I trying to create a com object to interact with JavaScript.
How can I do it? Is there any example?

Thanks.
-- 
Miguel Ferreira Simoes 
Jan 29 2005
parent reply Chris Sauls <Chris_member pathlink.com> writes:
Maybe I'm biased... but have you considered using DMDSCript for your project?

-- Chris Sauls

In article <ctgmj4$60h$1 digitaldaemon.com>, Miguel Ferreira Simões says...
I trying to create a com object to interact with JavaScript.
How can I do it? Is there any example?

Thanks.
-- 
Miguel Ferreira Simoes 
Jan 29 2005
parent reply J C Calvarese <jcc7 cox.net> writes:
In article <ctgr4c$b6u$1 digitaldaemon.com>, Chris Sauls says...
Maybe I'm biased... but have you considered using DMDSCript for your project?
I'm not sure what he's trying to do, but if he wants to create a COM object in JavaScript and interact with it D, DMDScript might not help. For example this code (which works in Microsoft's JScript) var XLApp = new ActiveXObject("Excel.Application"); isn't recognized by DMDScript. But I don't know how to create a COM object in D to interact with JavaScript, so hopefully DMDScript (even without ActiveX functionality) will be good enough to address his problem. jcc7
Jan 31 2005
parent "Miguel Ferreira Simões" <Kobold netcabo.pt> writes:
It's my first time working around with COM objects.
Hopeffuly I found an example in the dmd samples directory (chello.d, 
dserver.d).

Right now I can create instanciate an object from jscript with:
   var obj = new ActiveXObject("myobjectname");

The problem appears when I try to call a method!
I think I have to implemente the IDispatch interface, isn't it?

Miguel Ferreira Simoes
Jan 31 2005