Pages: 1
Print
Author Topic: Creating event aware objects  (Read 185 times)
JRP
Member

Posts: 2


« on: September 28, 2018, 03:13:16 PM »

I'm using XMetal 11 Author Enterprise version 11.0.0.066.

Is it possible to use WScript.CreateObject in a macro to enable event handling from .NET objects?  When I try to use the following jscript in a macro, the code fails to create the object.

   var objTest = null;
   objTest = WScript.CreateObject("testEvents.testEvent","objTest");


As I understand it, creating objects using new ActiveXObject or CreateObject generically does not allow the script to consume events raised from an object.  Any help with processing events raised from .NET objects would be appreciated.
Logged
XMetaLOldTimer
Global Moderator
Member

Posts: 54


« Reply #1 on: November 09, 2018, 06:54:41 PM »

There is no support for automatic event sink binding via the script engines within XMetaL.  You have to setup things manually and program APIs to receive XMetaL script engine objects. 

Fwiw, we have an old .NET 1.1 sample that demonstrates calling from XMetaL to a .NET control and vica versa....NET calling a Jscript object in XMetaL's script engine.

Regards,
Addam

* demo.zip (13.57 KB - downloaded 10 times.)
Logged

Addam Smith, XMetaL Project Lead & Architect
JustSystems Canada Inc.
Pages: 1
Print
Jump to: