quote:
Originally posted by felipEx
Try to preview your interface xml file by using MP! Interface tester and see if you can preview your window correctly (if not so, you'll get an error message telling you why the window couldn't be loaded). Also, make sure you're calling the MsgPlus.CreateWnd function correctly.
It says "Error" but doesn't say what exactly. Here's the code... As copy/pasted from the docs, lol.
code:
<Interfaces xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Window Id="WndTest" Version="1">
<Attributes>
<Caption>Test Window</Caption>
</Attributes>
<TitleBar>
<Title><Text>Hello!</Text></Title>
</TitleBar>
<Position ClientWidth="170" ClientHeight="45"/>
<DialogTmpl/>
<Controls>
<Control xsi:type="StaticControl" Id="LblTop">
<Position Left="10" Top="10" Width="150"/>
<Caption>Hello world!</Caption>
</Control>
<Control xsi:type="ButtonControl" Id="BtnClose">
<Position Left="115" Top="25" Width="50"/>
<Caption>Close</Caption>
</Control>
</Controls>
</Window>
</Interfaces>
code:
function OnEvent_Initialize(MessengerStart)
{
var Wnd = MsgPlus.CreateWnd("InterfaceTest.xml", "WndTest");
}
Both are in the same directory.