NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 24 25 26 27 28 … 93 Next »
problems with screen updates from ActivateItem

 
  • 0 Vote(s) - 0 Average
problems with screen updates from ActivateItem
InVermont
Offline

Member

Posts: 157
Threads: 10
Joined: Mar 2007
#1
2009-03-12, 03:59 PM
when doing things that take a long time, I like to display periodic updates to the user, letting them know my code hasn't crashed, it is just busy.
something like


SetOnScreenText("performing query. Please wait");
Pluginhelper.ForceRepaint();
execute(query);
foreach (record r in query) {
SetOnScreenText("processing record " + r.title )
Pluginhelper.ForceRepaint()
// process record
}

Now, this works as expected if triggered from a button. But when called from ActivateItem, the screen never updates until after ActivateItem is exited.
Is this by design? Is there a way around it?
Thanks
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2009-03-12, 04:09 PM
When I have things that are potentially going to take a long time, I do it in chunks, a little bit at a time with each call to NeedsRendering(). How much I usually do is based on time. For example, I'll process stuff for up to a second, if it takes long I'll do more of it on the next call. It makes the logic a little more complicated, but helps the responsiveness.
InVermont
Offline

Member

Posts: 157
Threads: 10
Joined: Mar 2007
#3
2009-03-12, 04:45 PM
Thanks. I'll have to give that some thought.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems with Windows UWP App spitefulgod 4 3,765 2016-12-15, 08:35 PM
Last Post: spitefulgod
  NextPVR and NRecord, between releases, updates p37307 1 2,530 2016-10-29, 01:08 AM
Last Post: sub
  GetPlaybackPosition - getting updates psycik 8 2,963 2013-08-11, 06:28 PM
Last Post: sub
  Key press problems imilne 13 4,804 2013-01-02, 04:05 PM
Last Post: imilne
  Plugin problems with started from the command line mvallevand 11 4,930 2012-08-12, 07:56 PM
Last Post: sub
  Multiple lists like in Search Screen cncb 7 3,216 2012-08-08, 09:11 PM
Last Post: cncb
  How to prevent default screen background? cncb 28 8,207 2012-05-16, 08:28 PM
Last Post: ACTCMS
  Checking for updates imilne 13 3,596 2012-01-21, 10:19 PM
Last Post: mvallevand
  Concatenate Name and Subtitle in Pending Recordings Screen Northpole 0 1,170 2011-09-20, 02:54 PM
Last Post: Northpole
  Settings config screen for class IEventNotification plugin imilne 9 3,439 2011-09-17, 06:06 PM
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