NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 8 9 10 11 12 … 93 Next »
Key press problems

 
  • 0 Vote(s) - 0 Average
Key press problems
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#11
2012-12-31, 07:38 PM
Cheap-ass Tesco vodka Big Grin

With ginger beer though. Gives it a nice tang.

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#12
2013-01-01, 07:53 PM
imilne Wrote:Yep, I was returning true. sub, what you say makes sense, but PLAYBACK_KEYDOWN was only intercepted in one place. If anything, now that you mention that, I'd have expected the first screen to open on F5, and then the first screen again from a subsequent F5 because PLAYBACK_KEYDOWN is still catching it.

I've attached a stripped to the bone copy of the source if you want to take a look. MediaInfoPlugin is the control class that handles PLAYBACK_KEYDOWN and then the other two classes are the actual screens.

Thinking about it some more, I'll probably try to handle everything in PLAYBACK_KEYDOWN seeing as it catches everything, rather than have one of the screens try to do OnKeyDown too. At least its behaviour is not what you expect so I feel more confident about getting to the bottom of it now. Thanks.

Iain
I took a look at the sample, and the app seems to be behaving the way I'd expect. The PLAYBACK_KEYDOWN event is like a hook that lets a plugin preview any key that is pressed. Regardless of what the plugin does, that key will still be passed on to the active plugin. It just so happened you were activating the OverlayBasic screen in that plugin when the F5 key was pressed, and after the PLAYBACK_KEYDOWN event was finished processing the F5 key was passed to the active screen (now OverlayBasic), where the OverlayBasic screen had logic that would handle the F5 key to switch to the OverlayAdvanced screen.

Personally I'd just put the screen switching logic in the MediaInfoPlugin.Notify() method.

I've found the reason Dispose() is not called when you're calling ActivateScreen() when another screen is already active, and have fixed it for the next release. Deactivate() was being called.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#13
2013-01-01, 08:53 PM
Thanks sub, I think I understand it now that you've explained it (and the vodka is starting to wear off).

I did make a start on using Notify as you suggest but got stumped by the lack of either Dispose or Deactivate. The plan was to detect which screen was active by having them set flags in their Activate/Deactivate methods but I'm still not seeing any evidence of Deactivate getting called; nothing hits the logs when I put logging statements there anyway...

Iain
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#14
2013-01-02, 04:05 PM
Sub, do you mind explaining in a bit more detail about *when* Deactivate() should get called?

I'm just not seeing it happen at all, other than when one of my screens is opened on top of the other, causing the first one to deactivate. Closing a screen normally or having it time out and close isn't causing the event.

Thanks

Iain
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems with Windows UWP App spitefulgod 4 3,784 2016-12-15, 08:35 PM
Last Post: spitefulgod
  Plugin problems with started from the command line mvallevand 11 4,959 2012-08-12, 07:56 PM
Last Post: sub
  problems with screen updates from ActivateItem InVermont 2 1,701 2009-03-12, 04:45 PM
Last Post: InVermont
  GBPVRX2.Popups.PopupBase don't close on button press psycik 2 1,439 2008-11-03, 07:35 AM
Last Post: psycik
  XMLSerializer Problems with Plugins ralphy 6 4,459 2008-02-16, 02:54 PM
Last Post: whurlston
  Problems retrieving providers using MceEpg2xmlTv kiekar 4 1,791 2007-10-13, 04:08 PM
Last Post: kiekar
  Form KeyDown Event Problems HydroChronic 1 1,491 2007-07-17, 02:09 PM
Last Post: HydroChronic
  Problems with THEATRIX 550 HW MPEG2 encoder bitrates. tmrt 0 1,219 2007-05-28, 01:36 PM
Last Post: tmrt
  Problems Connecting up a Radio Graph timh 6 2,512 2006-11-11, 08:10 PM
Last Post: timh
  Problems with Querries in SQL Lite Jeff 10 3,808 2006-06-16, 05:32 AM
Last Post: alibert

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

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

Linear Mode
Threaded Mode