Pages: 1
Print
Author Topic: Access XMetal Dev. API from inside a web application inside a Explorer ActiveX  (Read 2146 times)
Grimwolf
Member

Posts: 1


« on: March 06, 2009, 09:15:06 AM »

Hello,

Here is my setup - I create an additional tab inside the Resource Manager and put a Shell.Explorer.2 ActiveX in it. Then I load some web application in this ActiveX.

if (!ResourceManager.Visible)
    ResourceManager.Visible = true;

try {
    ResourceManager.AddTab("MyTab", "Shell.Explorer.2");}
catch (e) { }

var webCtrl = ResourceManager.ControlInTab("MyTab");
webCtrl.Navigate("http://localhost:8400/");
ResourceManager.SelectTab("MyTab");

Is there some way to access the XMetal API from inside this application (http://localhost:8400/)? I mean the objects like Application, Documents, ActiveDocument, etc.

My idea is when I click some link inside the app to be able to access the API with JavaScript and perform some actions like pasting XML, selecting nodes, etc.

Anyone got any idea?
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1548



WWW
« Reply #1 on: March 06, 2009, 03:08:41 PM »

Yes. You can instantiate XMetaL Author as a COM object.

Here's a JScript example that might be placed inside a function in an HTML page:
Code:
var xmapp = new ActiveXObject("XMetaL.Application");
xmapp.Alert("hello world");
xmapp = null;
Logged
Pages: 1
Print
Jump to: