WindowXML & Init event - Printable Version
+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Add-ons (/forumdisplay.php?fid=26)
+--- Thread: WindowXML & Init event (/showthread.php?tid=47659)
WindowXML & Init event - DuШes - 2009-03-29 02:05
pls help me, i need to run python script after my skinned window loading event, defined as home.xml of the my skin.
How can i do it, i tryed to place next code into my window definition:
but i dont see anything.
ps: i've not found the oninit or onload tag in the window xml structure (http://wiki.xbmc.org/?title=Window_Structure), but i think that is possible, am'i right?
- jmarshall - 2009-03-29 02:56
If you are using windowxml, then use the python oninit callback to do processing.
See the python documentation (see Nuka1195's sig for instance)
- Nuka1195 - 2009-03-29 06:34
- jpoveda - 2009-03-29 07:22
Thanks a lot.
- DuШes - 2009-03-29 09:13
jmarshall Wrote:If you are using windowxml, then use the python oninit callback to do processing.
sorry, but i don't want to run script , i need to run script from my our skin (more, i want to do it declaratively in the window XML definition), and i cannot find anything like init or init callback in the http://wiki.xbmc.org/?title=Window_Structure and http://xbmc.sourceforge.net/python-docs/xbmcgui.html documentation...
may be, are the docs in these links not actual for present? becouse i see and onInit and onFocus callbacks in here:
but cannot find it in the links above showed///
ps: sorry my dreadfull english
pps: thxs a lot for your answers
- jmarshall - 2009-03-29 10:06
Easiest way in that case is to make a default control have an <onfocus> event (which runs the script, then sets focus elsewhere).
- DuШes - 2009-03-29 10:31
jmarshall Wrote:Easiest way in that case is to make a default control have an <onfocus> event (which runs the script, then sets focus elsewhere).
i 've done it as it is done in the startup xml window :
<control type="button" id="10">