Solved Custom XML Windows receive args?
#1
So I know that I can pass args to a window, and that works great. Right now I have window created, when open I have it run a some code that loads a config into a "Object". Now that object it sitting in the OnInit par of the window class. This window is just a inbetween the user doesn't have to do anything once the code had finished running i would like to return to the previous window; but with my "Object" is there a way that i can pass that object back.
python:
ui=mywindow
ui.doModal()
delete ui

So to pass it back is there a way to do something like
python:
ui=mywindow
data = ui.doModal()
delete ui
print(data)
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply
#2
give this a shot:

python:
ui=mywindow
ui.doModal()
data = ui.myobject
delete ui
print(data)
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
#3
(2019-04-03, 18:01)ronie Wrote: give this a shot:

python:
ui=mywindow
ui.doModal()
data = ui.myobject
delete ui
print(data)

This worked like a charm. Thank you
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply

Logout Mark Read Team Forum Stats Members Help
Custom XML Windows receive args?0