Posts: 3,660
Joined: Feb 2008
Reputation:
93
Jeroen
Team-Kodi Member
Posts: 3,660
Make sure you also declare the window ID in the xml of your custom window:
<window id="90100">
xbmc will use that top identify and open the window, not the filename of the custom window.
Although that is possible too if you include the extension:
<onclick>XBMC.ActivateWindow(custom 90100.xml)</onclick>
But the first method is the proper way.
Posts: 36
Joined: Jul 2010
Reputation:
0
rubenm
Junior Member
Posts: 36
that's exactly what i did ... but one case, with just the id, as in
XMBC.ActivateWindow(90100)
i get this log output:
15:13:30 T:2695587072 M:1529909248 ERROR: Unable to locate window with id 80100. Check skin files
15:13:31 T:2695587072 M:1529958400 DEBUG: SDLKeyboard: scancode: 0, sym: 310, unicode: 0, modifier: 0
but interestingly, a bit above it, i get:
15:13:29 T:2695587072 M:1531105280 DEBUG: Activating window ID: 10000
15:13:29 T:2695587072 M:1531105280 DEBUG: Checking if window ID 10000 is locked.
15:13:29 T:2695587072 M:1531105280 DEBUG: ------ Window Deinit (Home.xml) ------
15:13:29 T:2695587072 M:1531105280 DEBUG: ------ Window Init (Home.xml) ------
15:13:29 T:2695587072 M:1531105280 INFO: Loading skin file: Home.xml
where we have exactly the 10000 offset in the id ... i'm wondering why that is?
Posts: 302
Joined: Jun 2009
Reputation:
3
the easiest way to test this offset problem is, to use an id under 10000
Posts: 36
Joined: Jul 2010
Reputation:
0
rubenm
Junior Member
Posts: 36
how do i specify wether it's a delta window id or a window id? and ... is there any example that explains exactly in what basis delta window ids are calculated? delta to what?
i call
XBMC.ActivateWindow(90100)
from the home screen, but the c code seems to be looking for 80100. the number in the custom window's id att is 90100 ...
Posts: 302
Joined: Jun 2009
Reputation:
3
i believe you have to use a 1-4 digit long id, so that xbmc can add a One at the beginning.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Anything under 9999 will work without a problem. Anything above it may not. I'd appreciate it if someone would note this in the online manual.
All IDs in XBMC should ideally be < 10000. This ensures that clashes aren't made with various other integer IDs used throughout.
Cheers,
Jonathan