NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 21 22 23 24 25 … 93 Next »
Plugins and MVP / PCH - are there extra requirements?

 
  • 0 Vote(s) - 0 Average
Plugins and MVP / PCH - are there extra requirements?
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#11
2008-05-19, 09:58 PM (This post was last modified: 2008-05-19, 10:00 PM by Ommina.)
Hm, I'm using JW's UI Library, so it took an extra bit of digging to find out what the elements were named. In the end, I just dumped out the name and the force refresh property of the GBPVRuiElement passed into GetRenderList via Debug.WriteLine

Here are the results (first value is the index of the list item):
Code:
0 ListViewListNormal False
1 ListViewListNormal False
2 ListViewListSelected False
3 ListViewListNormal False
4 ListViewListNormal False
5 ListViewListNormal False
6 ListViewListNormal False
7 ListViewListNormal False
8 ListViewListNormal False
9 ListViewListNormal False
10 ListViewListNormal False
11 ListViewListNormal False
12 ListViewListNormal False
13 ListViewListNormal False

Given sub's comments above, I can see how the rendering might get confused. Indeed, I'm left wondering how it works at all.

However, what's more interesting though is, with this bit of debug code included, I'm able to easily reproduce what (I think) Ted is seeing. After a couple of page downs and some general scrolling, the output looks like this:

Code:
0 ListViewListNormal False
1 ListViewListNormal False
2 ListViewListNormal False
3 ListViewListNormal False
4 ListViewListNormal False
5 ListViewListSelected False
6 ListViewListNormal False
7 ListViewListNormal False
8 ListViewListNormal False
9 ListViewListSelected False
10 ListViewListNormal False
11 ListViewListNormal False
12 ListViewListNormal False
13 ListViewListNormal False

Here we have multiple items showing as selected (which shouldn't be happening) neither of which had anything to do with what the current index was.

Maybe there is a timing issue here as well, that doesn't appear until getRenderList starts taking too long to finish? (Or maybe not. I'm taking guesses.)

But it does sound like I'll have to ask JavaWiz about it as well. Better check to ensure that I'm using the most recent version of the library too.

Thank you all for your help in tracking this down!
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#12
2008-05-20, 03:47 AM
Does this problem only seem to manifest itself on the PCH? I have not ever seen this behavior on the PC or MVP.

Neverless, I've created a new version of WizUiHelper.DLL that creates a uniquely named GBPVRUiElement for each item in the list (WizUiList). Could you see if this solves your problems?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,788
Threads: 769
Joined: Nov 2003
#13
2008-05-20, 03:56 AM
JavaWiz Wrote:Does this problem only seem to manifest itself on the PCH? I have not ever seen this behavior on the PC or MVP.
This new mechanism for sending incremental updates through to the PCH was only added post 1.2.9. The scheme I came up with for determining which parts of the screen had been updated worked quite well for the built in screens, only requiring one small change on the main menu element names, but I'm not surprised it would cause problems for some plugins, since I've never conveyed anything info about how unique the element names should be.

There is an option in the next release for turning on incremental updates on the MVP, so hopefully you'll be able to see the problem in person then.
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#14
2008-05-20, 04:24 AM
sub Wrote:This new mechanism for sending incremental updates through to the PCH was only added post 1.2.9. The scheme I came up with for determining which parts of the screen had been updated worked quite well for the built in screens, only requiring one small change on the main menu element names, but I'm not surprised it would cause problems for some plugins, since I've never conveyed anything info about how unique the element names should be.

So, when creating the GBPVRUiElement, the rule is that the 1st parameter should be unique, correct?
Code:
[SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][SIZE=2].uiElement = [/SIZE][SIZE=2][COLOR=#0000ff]new [/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]GBPVRUiElement[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]"SomeUniqueName"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][SIZE=2].Location, targetImage, 0xff);[/SIZE]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,788
Threads: 769
Joined: Nov 2003
#15
2008-05-20, 04:39 AM
Yes, probably. It doesnt really have to be unique, but I often store some information in that field which describes what it contains.

The hash ends being made up from the name + location + forceRefresh status, so problems only really occur when you end up replacing one element with another one which happens to have the same location and name and forceRefresh status (in this case the app isnt aware that it contains a different picture in the bitmap).
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#16
2008-05-20, 05:22 AM
JavaWiz Wrote:Does this problem only seem to manifest itself on the PCH? I have not ever seen this behavior on the PC or MVP.

Neverless, I've created a new version of WizUiHelper.DLL that creates a uniquely named GBPVRUiElement for each item in the list (WizUiList). Could you see if this solves your problems?

W00t! (I can't believe I just typed that, I'm so embarrassed.)

For what it is worth, I provided a rather unattractive hack to Ted the Penguin (I replaced the name of the GBPVRUIElement with a GUID before adding it to the GetRenderList ArrayList) and it did clear up the problem. With that in mind, I expect the changes you made to the UI Library will be effective. (And I'll be able to take out that icky bit of extra code.)

Thank you so much for the quick update, and to sub as well for the details. It was very nice to go from "problem, I've no idea what's going on" to "try this" to "interim solution" to "updated library" within 24 hours.
Ted the Penguin
Offline

Posting Freak

Posts: 1,590
Threads: 64
Joined: Aug 2006
#17
2008-05-20, 02:21 PM
yeah, I do have to say that it was a pretty fast resolution of the issue.

Thanks for everyones help!
sub Wrote:Are you trying to make sure I get nothing done today?
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#18
2009-03-17, 11:33 PM
From an old chap who is struggling a bit...
sub Wrote:Behind the scenes the application makes a hash key from the elements in the renderlist, built from its name + location + forceRefresh attributes. It uses these hash keys to determine if something has changed from previous screen to next screen.
with this code...
Code:
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] lastPanel = [/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]"NotPlaying0"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE]
...
[SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]Hashtable[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] args1 = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]new [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]Hashtable[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](); [/SIZE]
[SIZE=2]...[/SIZE]
[SIZE=2]uiElement1 = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]new [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]UiStatic[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](skinHelper, lastPanel, args1);[/SIZE]
[SIZE=2]uiElement1.SetArgs(args1);[/SIZE]
[SIZE=2][SIZE=2]uiElement1.setLocation(BoxXY());[/SIZE][/SIZE]
I'd like to be able to refresh uiElement1 but it's not practical to change the name and I only want to change the location occasionally - is there any way I can change the forceRefresh attribute?

BTW if anyone thinks I should be looking for a new hobby - like knitting - just say...
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,788
Threads: 769
Joined: Nov 2003
#19
2009-03-17, 11:36 PM
If you've called SetArgs(), and anything has changed, then it should set the forceRefresh attribute automatically.
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#20
2009-03-17, 11:45 PM
sub Wrote:If you've called SetArgs(), and anything has changed, then it should set the forceRefresh attribute automatically.
the value of one of the items in the hashtable changes
Code:
[SIZE=2]args1[[/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]"@PlayPos"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]] = ...[/SIZE]
but the hashtable always contains the same item names
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (5): « Previous 1 2 3 4 5 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Extra overriding #EXT-X-KEY wishlist mvallevand 4 564 2025-01-08, 05:56 PM
Last Post: sub
  Extra Events jcole998 1 1,518 2021-03-08, 02:48 PM
Last Post: mvallevand
  Plugins and NPVR. Where do we start? sub 80 69,947 2020-11-26, 10:02 PM
Last Post: mandai
  I want to start developing plugins...but how? OrenShapir 6 4,147 2014-11-18, 10:38 PM
Last Post: mvallevand
  Tuner plugins and client id mvallevand 2 2,107 2013-07-03, 01:39 AM
Last Post: mvallevand
  Tuner Plugins - Output folders mvallevand 2 2,073 2013-02-19, 07:45 PM
Last Post: mvallevand
  .NET 4 plugins? McBainUK 20 7,880 2012-12-11, 08:48 PM
Last Post: sub
  Integrated Development Environment (IDE) for plugins osx-addict 5 2,832 2012-10-18, 08:35 PM
Last Post: osx-addict
  Tuner plugins mvallevand 4 2,496 2012-08-05, 11:19 PM
Last Post: mvallevand
  Recorder plugins - Deleting tuners mvallevand 1 1,556 2012-03-29, 12:51 AM
Last Post: sub

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

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

Linear Mode
Threaded Mode