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 https://github.com/xbmc/xbmc/pull/13542 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.
Dev-Maintainer of Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
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
#13
(2019-01-07, 12:08)stefive83 Wrote: Exists a workaround? is possible a fix in Leila final build? @jfcarroll

as i thought, i was wrong, now it works.
I tried using Container.SetViewMode and it is not working yet. Any updates or work-arounds ?
Reply
#14
Ok, there seems to be a workaround. At least it works in my addon (Rom Collection Browser).

Just invoke Container.SetViewMode twice and it works again. Not nice, but until now the only option I found to solve this issue.

Thanks to @Royusmc for digging into this.
Reply

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