Window won't show up -_- |
Author: |
Message: |
dokueki
New Member
Posts: 11
33 / /
Joined: Nov 2008
|
O.P. Window won't show up -_-
I just started with the window starter tutorial on the documentation... Did everything they said, just copy/pasted and the window won't show up when I save the script D: ideas?
|
|
05-09-2009 10:24 AM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
RE: Window won't show up -_-
Save the xml file as Unicode in notepad
<Eljay> "Problems encountered: shit blew up"
|
|
05-09-2009 11:02 AM |
|
|
ryxdp
Senior Member
Posts: 804 Reputation: 16
29 / /
Joined: Jun 2006
|
RE: Window won't show up -_-
Also, if you've just copied and pasted the windows, you should make sure to change the window ids to something else, as these windows already exist in Messenger Plus! and AFAIK may cause issues when trying to create them.
|
|
05-09-2009 11:07 AM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
RE: Window won't show up -_-
quote: Originally posted by ryxdp
Also, if you've just copied and pasted the windows, you should make sure to change the window ids to something else, as these windows already exist in Messenger Plus! and AFAIK may cause issues when trying to create them.
WindowIDs do not need be unique across the board... You can use the same WindowID in for multiple windows in a single script as long as the xml for each is in a separate file. In fact, I think you can have multiple instances of the same window open too for that matter (for example the desktop contact window is re-used)
<Eljay> "Problems encountered: shit blew up"
|
|
05-09-2009 11:23 AM |
|
|
dokueki
New Member
Posts: 11
33 / /
Joined: Nov 2008
|
O.P. RE: Window won't show up -_-
quote: Originally posted by Spunky
Save the xml file as Unicode in notepad
quote: Originally posted by ryxdp
Also, if you've just copied and pasted the windows, you should make sure to change the window ids to something else, as these windows already exist in Messenger Plus! and AFAIK may cause issues when trying to create them.
Neither works
|
|
05-09-2009 10:57 PM |
|
|
ryxdp
Senior Member
Posts: 804 Reputation: 16
29 / /
Joined: Jun 2006
|
RE: RE: Window won't show up -_-
quote: Originally posted by Spunky
WindowIDs do not need be unique across the board... You can use the same WindowID in for multiple windows in a single script as long as the xml for each is in a separate file. In fact, I think you can have multiple instances of the same window open too for that matter (for example the desktop contact window is re-used)
Alright then. I was thinking that if a script had a window with an id that Plus's own interface was already using, it might have confused Plus a bit.
|
|
05-09-2009 11:04 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: Window won't show up -_-
Post the code you use to create the window and the XML of the window itself.
|
|
05-09-2009 11:36 PM |
|
|
felipEx
Scripting Contest Winner
Posts: 378 Reputation: 24
35 / /
Joined: Jun 2006
|
RE: Window won't show up -_-
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. ;-)
|
|
05-10-2009 12:11 AM |
|
|
dokueki
New Member
Posts: 11
33 / /
Joined: Nov 2008
|
O.P. RE: RE: Window won't show up -_-
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.
This post was edited on 05-11-2009 at 02:17 PM by dokueki.
|
|
05-11-2009 02:13 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: Window won't show up -_-
First things first you are missing a big chunk of the header:
xml code: >>><?xml version="1.0" encoding="UTF-16"?><<<
>>><Interfaces xmlns="urn:msgplus:interface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:msgplus:interface PlusInterface.xsd"><<<
<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>
This post was edited on 05-11-2009 at 03:02 PM by matty.
|
|
05-11-2009 03:01 PM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|