NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 23 24 25 26 27 … 93 Next »
Reinitialise method

 
  • 0 Vote(s) - 0 Average
Reinitialise method
scb147
Offline

Posting Freak

Posts: 806
Threads: 77
Joined: Nov 2006
#1
2009-07-21, 09:02 PM
When does the Reinitialise method get called? I have an image contained within a Hashtable, but I cannot get the updated image to appear. It will initially display, but an update will just blank it out.

Does the Reinitialise method come into this or how else does one do this when the image is in a Hashtable?
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#2
2009-07-21, 09:08 PM
Take a look at IMenuTask:needsRendering
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
scb147
Offline

Posting Freak

Posts: 806
Threads: 77
Joined: Nov 2006
#3
2009-07-21, 09:35 PM
I believe it is rendering, it's just not updating.

I have other screens which update the image, but I am directly changing the image in the hashtable:
Code:
Image currentIcon = Image.FromFile(iconPath + current.icon + ".png", true);
myHashTable["@image"] = currentIcon;

But the image that isn't updating is contained in a List of Hashtables. I was hoping to change the screen (blue/yellow buttons) and have the next Hashtable in the list appear. But I can't seem to get the UiElement to update.

I am using the WizUtilities and I have tried the .forceRefresh() method on the element, but it doesn't seem to help.

Do I possible need to dispose() to old element and create a new one with the new hashtable?
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#4
2009-07-21, 10:47 PM
This was discussed previously as an "Oh by the way..." in some thread but I can't remember where. Add a text field to the hashtable and change the value whenever you update the image. DateTime.Now works well if you are doing multiple updates to the image.

Code:
Image currentIcon = Image.FromFile(iconPath + current.icon + ".png", true);
myHashTable["@image"] = currentIcon;
myHashTable["@dummytext"] = string.Format("{0}", DateTime.Now);

You can also use the full path of the image for the dummy text if you are not reloading the same file. The dummy text doesn't need to be rendered anywhere, just in the hashtable.
scb147
Offline

Posting Freak

Posts: 806
Threads: 77
Joined: Nov 2006
#5
2009-07-22, 02:03 PM
I already have 2 text fields in the Hashtable that are being updated. I've done a printout of the Hashtable contents in the rendering method, and I see that they are changed. Yet, the screen does not update, text or image.
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#6
2009-07-22, 02:17 PM
Can you post the code? Might be something easy to see with fresh eyes.
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
scb147
Offline

Posting Freak

Posts: 806
Threads: 77
Joined: Nov 2006
#7
2009-07-22, 02:23 PM
Well, once I get rid of the List of Hashtables, the problem disappears. Text and image updates fine.

I guess a List of Hashtables isn't going to work.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  is there a service?method which returns listings for multiple channels? reven 16 6,931 2022-04-11, 04:30 PM
Last Post: mandai
  Show artwork method psycik 31 11,742 2015-07-14, 07:06 AM
Last Post: aloxinh
  couple of issues with recording.recurring.save method reven 10 4,669 2014-01-03, 11:11 PM
Last Post: reven
  Advice on which streaming method to use fred250 17 6,194 2013-09-14, 11:14 AM
Last Post: fred250
  getting recurring recordings from service?method API? reven 2 1,941 2013-08-03, 10:50 PM
Last Post: reven
  Method for Playing Streams skate15e 11 4,292 2008-07-12, 06:04 PM
Last Post: sub
  Method to notify plugin of exit whurlston 6 2,902 2008-06-15, 06:20 AM
Last Post: ralphy
  GetAudioPlayList method - MVP Hunter Sun 8 2,677 2005-11-26, 10:54 PM
Last Post: Hunter Sun
  Help with getNamedColor method Jeff 2 1,316 2005-05-02, 05:59 PM
Last Post: Jeff

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

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

Linear Mode
Threaded Mode