window IDs
#1
hi,

a quick test with custom windows left me confused. i have a custom window in a file called "custom 90100.xml", it defines a window with the id "90100", and a button in a list on the home screen that says:

<onclick>XBMC.ActivateWindow(90100)</onclick>

... but when i click it, i get this in the log:

12:47:44 T:2695587072 M:1704955904 ERROR: Unable to locate window with id 80100. Check skin files

i've come across delta ids and ids ... this delta ... how does it work? how is it calculated? can somebody elaborate?

thanks Smile

.rm
Reply
#2
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.
Reply
#3
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?
Reply
#4
rubenm Wrote:that's exactly what i did ... but one case, with just the id, as in

XBMC.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?
could it be that you use the wrong id somewhere?
80100 <->90100?
Reply
#5
rubenm Wrote: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?
That's just the difference between WINDOW ID (used by XBMC's C++ code) and DELTA WINDOW ID (used by skin .xml files).

XBMC.ActivateWindow() can use either the Window name, the Window ID, or the delta Window ID.

Window IDs
Reply
#6
the easiest way to test this offset problem is, to use an id under 10000
Reply
#7
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 ...
Reply
#8
Strange, I just tried and it does look for 80100.

Why don't you try this -

custom_file_901.xml

PHP Code:
<window id="901" type="dialog"

<onclick>XBMC.ActivateWindow(901)</onclick>
Reply
#9
i believe you have to use a 1-4 digit long id, so that xbmc can add a One at the beginning.
Reply
#10
i tried it.

9998 -> works

9999 -> does not work ... ideas, anyone?

@eumel - why would it want to add a "1" ?
Reply
#11
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
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
window IDs0