Forum Discussion

bmn's avatar
bmn
Visitor
14 years ago

roAppManager SetThemeAttribute runtime change

Hi I'm havign some problems setting a theme, im loading the assets from the web, they are loading fine, the file loads and exists.. but when theyre set to the roAppManager via SetThemeAttribute, they dont appear...

Can roAppManager SetThemeAttribute be changed anytime during runtime and the changes will be shown?

thanks!
  • Usually you have to trigger some action to get changes to show. For example after updating the theme with roAppManager, something like this:

    function Refresh()
    dialog=createobject("roonelinedialog")
    dialog.show()
    dialog.close()
    end function

    will usually do the trick.

    - Joel
  • "RokuJoel" wrote:
    Usually you have to trigger some action to get changes to show. For example after updating the theme with roAppManager, something like this:

    function Refresh()
    dialog=createobject("roonelinedialog")
    dialog.show()
    dialog.close()
    end function

    will usually do the trick.

    - Joel

    Just to be clear.. that is a complete hack to get around what could possibly be considered a bug in the firmware. Depending on where you're calling it, resetting the content should technically cause the screen to repaint, which, if it works, is much less hackish that opening and closing a dialog. Ideally, another call to screen.Show() would force a repaint, but that wasn't the case the last time we discussed this.
  • renojim's avatar
    renojim
    Community Streaming Expert
    I believe calling screen.Show() now forces the update as I have a channel where I change the primaryLogo in the theme and I don't use any hacks to accomplish it, but I remembering fighting it for quite a while and I'm not positive that it works 100% of the time.

    -JT
  • Well, it is supposed to, but, I have never seen it work.

    - Joel
  • Thanks all for the ideas... but i couldnt get it working...

    here's what i'm doing:

    1 - load the images locally to tmp
    2 - check the images have loaded, whiche they did
    3 - set the images stored to SetThemeAttribute
    4 - i pop up the login modal

    the images aent shown...

    what else could i try?

    thanks!
  • renojim's avatar
    renojim
    Community Streaming Expert
    Are you sure it's not a caching problem? If you overwrite an image in tmp and keep the same name the old image will be used. Which theme attribute are you trying to change?

    -JT
  • Im trying to change OverhangSliceHD

    I made it work a couple of times by using an image from the web, without loading it before, just by setting the url to the attribute, but i couldnt get that same thing working again... i tried deleting all other possible references to OverhangSliceHD and setting that url at the begining of the code, but still no luck...