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
#1
2012-12-30, 07:51 PM
I have two IScreenPlugin implementations.

The first one is displayed - over video - in response to a PLAYBACK_KEYDOWN event, in this case catching F5.

Once active, it's also designed to respond to an F5 (via OnKeyDown), the idea being that you can go from the initial screen to a further screen of details using the same key.

My problem is that the initial (single) press of F5 seems to get passed right through the chain so that only the second screen appears. The first one is being called, but it instantly responds to the F5 and fires up the second one instead.

Bug? Or just me? Big Grin

The plan is supposed to be, press F5 once:

[ATTACH=CONFIG]35304[/ATTACH]

Then again while the above is active:

[ATTACH=CONFIG]35305[/ATTACH]

Iain
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,454
Threads: 963
Joined: May 2006
#2
2012-12-30, 10:18 PM
Are you eating the keystroke by returning True or are you still passing it to the base?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,953
Threads: 770
Joined: Nov 2003
#3
2012-12-30, 11:49 PM
imilne Wrote:The first one is displayed - over video - in response to a PLAYBACK_KEYDOWN event, in this case catching F5.
Anything that is registered to get EventNotifications will get sent all events, including PLAYBACK_KEYDOWN. It sounds like you're handling it in both your IScreenPlugin's, and they're fighting each other.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#4
2012-12-31, 01:41 PM
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
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,454
Threads: 963
Joined: May 2006
#5
2012-12-31, 02:17 PM
I know when I was rendering too many screens at one time I added this to NeedsRendering()

Code:
if (PluginHelperFactory.GetPluginHelper().ScreenSaverIsActive() || PluginHelperFactory.GetPluginHelper().GetActivePopup() != null)
            {
//                Debug.WriteLine(PluginHelperFactory.GetPluginHelper().GetActivePopup().GetName());
                changed = true;
                return false;
            }

Perhaps you could use this concept in your keyboard handler triggering on the name?

Martin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#6
2012-12-31, 03:07 PM
That's a good idea, but I can't seem to get a handle on the active popup. Even sticking the following into NeedsRendering() of one of my screens prints out null constantly.

Code:
if (PluginHelperFactory.GetPluginHelper().GetActivePopup() == null)
  Logger.Debug("null");

I'm obviously doing something daft here but can't quite put my finger on it...

Iain
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#7
2012-12-31, 05:44 PM
I'm also not seeing any action in either Deactivate() or Dispose() when either of the screens are closed. Should I?

Maybe programming while drinking wasn't such a good idea...

Iain
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#8
2012-12-31, 06:13 PM
imilne Wrote:Maybe programming while drinking wasn't such a good idea...

Iain
Of course it is... I write some of my best code after a few beers... Smile

Alex
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#9
2012-12-31, 06:59 PM
ACTCMS Wrote:Of course it is... I write some of my best code after a few beers... Smile

I'm obviously drinking the wrong stuff today...

Iain
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#10
2012-12-31, 07:14 PM
imilne Wrote:I'm obviously drinking the wrong stuff today...

Iain
That would be milk then...?

Alex
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems with Windows UWP App spitefulgod 4 4,108 2016-12-15, 08:35 PM
Last Post: spitefulgod
  Plugin problems with started from the command line mvallevand 11 5,587 2012-08-12, 07:56 PM
Last Post: sub
  problems with screen updates from ActivateItem InVermont 2 1,936 2009-03-12, 04:45 PM
Last Post: InVermont
  GBPVRX2.Popups.PopupBase don't close on button press psycik 2 1,676 2008-11-03, 07:35 AM
Last Post: psycik
  XMLSerializer Problems with Plugins ralphy 6 4,828 2008-02-16, 02:54 PM
Last Post: whurlston
  Problems retrieving providers using MceEpg2xmlTv kiekar 4 2,101 2007-10-13, 04:08 PM
Last Post: kiekar
  Form KeyDown Event Problems HydroChronic 1 1,680 2007-07-17, 02:09 PM
Last Post: HydroChronic
  Problems with THEATRIX 550 HW MPEG2 encoder bitrates. tmrt 0 1,379 2007-05-28, 01:36 PM
Last Post: tmrt
  Problems Connecting up a Radio Graph timh 6 2,902 2006-11-11, 08:10 PM
Last Post: timh
  Problems with Querries in SQL Lite Jeff 10 4,319 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