NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 63 64 65 66 67 … 93 Next »
Reload Skin changes on Render

 
  • 0 Vote(s) - 0 Average
Reload Skin changes on Render
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#1
2005-12-19, 11:12 PM
Hi

Have any of the developers figured out how to reload the skin file on each render.

This would be really useful while developing either skins and/or plugins. Make a change to skin file, and instead of having to reload, it just does it.
Jeff
Offline

Posting Freak

Posts: 1,933
Threads: 69
Joined: Oct 2004
#2
2005-12-19, 11:34 PM
Yes, I do this is the video archive and music player plug-ins. If you edit, for example, the list view skin.xml file, you will see that the plug-i adjusts in real time. I'll look at my code tonight and tell you what I did exactly, but as I recall the main thing was I just created a new skin helper in the render routine rather than just creating one in the activate like most examples do.

Jeff
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#3
2005-12-19, 11:41 PM
I was going to add something generic so I could force all instances of SkinHelper to drop and reload the settings, but some plugins seem to get things from skinhelper only once, and then cache them manually rather than using the cache in the skinhelper, which leads to problems.

Since there seems to be some interest in this sort of thing at the moment, I'll add it in for the next release.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#4
2005-12-19, 11:50 PM
I'm also intending to write some guide lines on developing plugins so that things are done more consistantly:

- standard button names, so that a simple change to BaseSkin.xml changes the buttons everywhere
- how the skinhelper should be used so that caching works as expected
- how to get temporary bitmaps so that we can reduce the number of very large 720x480x4 bitmaps we currently have hanging around
- how to use the Inset window
- how to make sure strings are translateable.
etc...
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#5
2005-12-20, 12:01 AM
All those ideas look good. I've only just started on the translatable stuff. But once you've got it, it gets quite easy to implement.

Jeff I managed to do it, but rather than reload all the time, I keep it's last update time so only reload when needed.

And since I've written a whole heap of generic screens (pop up boxes, lists etc) it was pretty easy to filter it down.
Old Dog
Offline

Posting Freak

Posts: 1,083
Threads: 99
Joined: Jul 2005
#6
2005-12-20, 11:41 AM (This post was last modified: 2005-12-20, 11:50 AM by Old Dog.)
Jeff Wrote:Yes, I do this is the video archive and music player plug-ins. If you edit, for example, the list view skin.xml file, you will see that the plug-i adjusts in real time. I'll look at my code tonight and tell you what I did exactly, but as I recall the main thing was I just created a new skin helper in the render routine rather than just creating one in the activate like most examples do.

Jeff

Okay, I'm very new to plugin coding, but I'm also very deep into it at the moment so I'll venture a guess...

There are three methods of interest here:
  • The Constructor
  • Activate
  • Render
I'm guessing that the constructor is called once, Activate is called when the user presses the plugin's button on the main menu, and render is called several times while the plugin is visible.

In general, I'd reread the skin file within Activate.

Psycik's application is a special case, within Render is probably right for him.

Now if we really wanted to get fancy...
  • make this code a separate method in the plugin
  • have a commandline option for a skin development flag
  • if the flag is set, the method is called within Render else Activate

-David

P.S. In fact this would be useful for plugin development too. I'm gonna try putting a flag inside my plugin tonight.
Learning new tricks!
Visit Plain Jane's Collection
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Skin help (correct location?) SFX Group 4 3,858 2018-01-24, 07:42 AM
Last Post: pBS
  skin question pBS 2 3,330 2016-06-18, 07:03 PM
Last Post: pBS
  Skin - view further into the future, scale the guide Vitenka 5 3,249 2014-11-26, 07:28 PM
Last Post: Vitenka
  Render order in Videos Jaggy 13 4,344 2011-10-12, 11:20 AM
Last Post: mvallevand
  Skin element Details in NowNext Jaggy 2 1,778 2011-09-19, 11:50 PM
Last Post: Jaggy
  Skin Help with Line Drawing Northpole 2 1,892 2011-07-19, 05:14 PM
Last Post: Northpole
  Anyone interested in developing a Skin Plugin? Hairy 13 4,949 2011-07-10, 04:13 PM
Last Post: mvallevand
  Skin help needed for EventDetails.xml bgowland 7 3,267 2011-06-26, 11:55 PM
Last Post: Jaggy
  Skin question - how to centre a list UiList control on screen? McBainUK 2 1,827 2011-02-17, 08:46 AM
Last Post: McBainUK
  List of Skin Elements ACTCMS 7 3,096 2010-12-22, 12:06 AM
Last Post: ACTCMS

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode