ActivateWindow Question
#1
Hello,
I'm trying to open a custom Window(XML) from another custom Window(XML),
and According to this guide, its not working because i want to open a "window" not a "dialog".

Looking at the skin files, i have seen it being used like this:
Code:
ActivateWindow([i]WindowNameHere[/i])

But since my window doesn't have a name; I'm guessing we should map the id of the window to a name somewhere in the skin ?! .. if thats the case, where is that map file.

Simply i have windowA.xml and windowB.xml and i want to open windowB from windowA by ActivateWindow.

ps: ActivateWindow(id), doesn't work.

Thanks.
I wrote a program to program my program ! - programception.
Reply
#2
You should use the ID of your custom window to activate the window.

So for example:
PHP Code:
<onclick>ActivateWindow(61)</onclick

And set the corresponding ID in your custom window's XML:

PHP Code:
<window id="61"

Also make sure the XML's filename is named "customWindowName.xml"
Reply
#3
ActivateWindow(id) should work.

most likely, the filename is the problem at your end.
custom windows must have a name like: custom*.xml
for example:
- custom1234.xml
- custom-Something.xml
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
Hmm its still not working! .. OK a couple of questions:
1. Do both files need to be in the same directory to be able to see each other ?
2. Do every skin has its own *custom*name.xml syntax ? (I'm using confluence).
3. Do i need to edit any other file in the skin.. so the skin would be aware that i have added a new window to it ? because i got the following line in xbmc.log:
Code:
15:18:32 T:5268 M:1218367488   ERROR: Unable to locate window with id 321.  Check skin files

Edit: Scratch that i wasn't adding the XMLs in the 720p skin directory i was using my own directory /facepalm

Thanks.
I wrote a program to program my program ! - programception.
Reply
#5
1. yes, everything should be in the 720p directory
2. nope
3. nope

try with a different id, as not all id's can be used.
give it a shot with id 1112 for instance.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
You can actually use the xml name instead of the id number too
Reply

Logout Mark Read Team Forum Stats Members Help
ActivateWindow Question0