PDA

View Full Version : Multiple Windows


nerdynick
June 5th, 2009, 01:15 AM
I seem to be having problems getting multiple windows to work in my app.
I'm calling ActivateWindow(14001) on the onclick event for a button but continue to get the following error in the log.


23:07:58 T:3051153296 M: 25088000 DEBUG: ExecuteXBMCAction : Translating ActivateWindow(14001)
23:07:58 T:3051153296 M: 25088000 DEBUG: ExecuteXBMCAction : To ActivateWindow(14001)
23:07:58 T:3051153296 M: 25088000 DEBUG: Activating window ID: 14001
23:07:58 T:3051153296 M: 25088000 DEBUG: Checking if window ID 14001 is locked.
23:07:58 T:3051153296 M: 25088000 ERROR: Unable to locate window with id 4001. Check skin files


I have tried naming the xml file a basic lower case string as well as the suggested XBMC customN.xml with no solution. Any ideas.

DPK
June 5th, 2009, 02:05 AM
Silly question probably, but are you sure your secondary skin xml file has this in it at the top:

<?xml version="1.0"?>
<window id="14001">

Also double check and search your 14000 xml file for 1401. For whatever reason it thinks that's what you're looking for. Probably just a typo.

nerdynick
June 5th, 2009, 02:26 AM
I've tried both


<window id="14001">

and

<window>
<id>14001</id>
</window>


Ya, I have no idea why on the last line it says 4001 instead of 14001. It kind of put me for a loop on how that could even happen.

nerdynick
June 6th, 2009, 02:56 PM
any idea of what would be doing this?

Heres what I have so far for code in the skin.


#Window 14000 - File main.xml
<control type="button" id="110">
<description>Search Window Button</description>
<posx>1245</posx>
<posy>360</posy>
<width>28</width>
<height>100</height>
<align>center</align>
<visible>true</visible>
<font>light21</font>
<textcolor>green</textcolor>
<label>Search</label>
<angle>90</angle>
<texturefocus></texturefocus>
<texturenofocus></texturenofocus>
<onclick>ActivateWindow(14001)</onclick>
<onfocus>ActivateWindow(14001)</onfocus>
</control>



#Window 14001 - File search.xml
<?xml version="1.0"?>
<window type="window" id="14001">
<defaultcontrol always="true">100</defaultcontrol>
<allowoverlay>no</allowoverlay>
<controls>
<!-- My Controls -->
</controls>
</window>


I have also played with the ids of the windows and it appears that boxee likes to do some weird things with the actual id numbers. 1 of which is to subtract 10000 from the ID as well as add 10000 to the id. i.e. If I pass 24001 to the ActivateWindow. I will get the following error


12:57:25 T:3050817424 M:114188288 DEBUG: ExecuteXBMCAction : Translating ActivateWindow(24001)
12:57:25 T:3050817424 M:114188288 DEBUG: ExecuteXBMCAction : To ActivateWindow(24001)
12:57:25 T:3050817424 M:114188288 DEBUG: Activating window ID: 24001
12:57:25 T:3050817424 M:114188288 DEBUG: Checking if window ID 24001 is locked.
12:57:25 T:3050817424 M:114188288 ERROR: Unable to locate window with id 14001. Check skin files


If passed 4001 to ActivateWindow I get this error:


13:02:01 T:3050817424 M:109490176 DEBUG: ExecuteXBMCAction : Translating ActivateWindow(4001)
13:02:01 T:3050817424 M:109490176 DEBUG: ExecuteXBMCAction : To ActivateWindow(4001)
13:02:01 T:3050817424 M:109490176 DEBUG: Activating window ID: 14001
13:02:01 T:3050817424 M:109490176 DEBUG: Checking if window ID 14001 is locked.
13:02:01 T:3050817424 M:109490176 ERROR: Unable to locate window with id 4001. Check skin files

nerdynick
June 6th, 2009, 04:10 PM
I've got it fixed now. It appears that when changing anything about a window (type, id, etc) other then its controls requires Boxee to be closed and reloaded. For those changes to be seen.