v18 -  Container.SetViewMode and other gui related methods not working in onInit
#1
Hi,

I still have some issues to get my script using WindowXML and the builtin list to work with Kodi Leia. My WindowXML defines several views and the addon saves the last selected view in addon settings. On next load the addon should select this view using "Container.SetViewMode()". This works fine in Krypton and older versions but does not in Leia. Other methods like self.SetFocus() also don't work anymore when called in onInit. When I put the same calls in an onClick-Event of a button, they work as expected.

I created a simple test script to demonstrate the behaviour: dropbox link.

I think that I have covered all the new stuff like isMedia and setContent but I am still missing something. Any tips how to solve this issue?

Regards
Malte
Reply
#2
strange, Container.SetViewMode() was working ok in leia builds up to a few weeks ago...
but i can confirm it's indeed broken now.
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
bug was introduced by 13542 (PR) as far as i can see.
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
#4
Ok, thanks a lot for looking into this.
Reply
#5
@malte Are you calling 'Update' on a WindowXML from your script?
Reply
#6
@jfcarroll i'm having the same problem with Container.SetViewMode() in the GlobalSearch addon, i'm not calling Update.
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
#7
I'm also not calling Update.

Container.SetViewMode() is not completely broken. It works when you invoke it in onClick() after a button press. But it does not work in onInit() anymore.
Reply
#8
Sorry to bring this up again. Just wanted to know if this issue will be fixed in Kodi or if I should try to find a workaround in my addon.
Reply
#9
Any news on this?

@ronie: did you try to find a workaround in your Global Search addon?
Reply
#10
Exists a workaround? is possible a fix in Leila final build? @jfcarroll

as i thought, i was wrong, now it works.
Reply
#11
Is there a fix  for this? I can't get it to work! Any help on this would be great. I'm trying to invoke on onInit() but not working.
Reply
#12
(2018-03-07, 23:29)malte Wrote: I'm also not calling Update.

Container.SetViewMode() is not completely broken. It works when you invoke it in onClick() after a button press. But it does not work in onInit() anymore.
 Anyone found a workaround for this? Will this be fixed or is a new bug requried?
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Container.SetViewMode and other gui related methods not working in onInit00