I’m having some problems using PtAddHotkeyHandler.
I need to have a window with many widgets responding to hotkey events. If I
add these hotkey callbacks by PhAB, that’s ok, all widgets behave like I
want to. However, if I add the same callbacks by code, using
PtAddHotkeyHandler, the same widget gets the hotkey event all the times and
it doesn’t let this event goes to its brothers, even if I return
Pt_CONTINUE.
I don’t know if I’m doing something wrong, but I don’t think so because
while I was debugging the program I saw the widget’s structure and the
hotkey_cb resource was ok. But of course, I might be wrong.
Here is the part where I try to add the hotkey callbacks.
What is list pointing to? Are you changing it somewhere else at all?
Thanks
Rodney
Previously, Vanessa Shimada wrote in qdn.public.qnxrtp.photon:
Hi!
I’m having some problems using PtAddHotkeyHandler.
I need to have a window with many widgets responding to hotkey events. If I
add these hotkey callbacks by PhAB, that’s ok, all widgets behave like I
want to. However, if I add the same callbacks by code, using
PtAddHotkeyHandler, the same widget gets the hotkey event all the times and
it doesn’t let this event goes to its brothers, even if I return
Pt_CONTINUE.
I don’t know if I’m doing something wrong, but I don’t think so because
while I was debugging the program I saw the widget’s structure and the
hotkey_cb resource was ok. But of course, I might be wrong.
Here is the part where I try to add the hotkey callbacks.
list is a PtList widget. In that code I wrote I was only trying to add some
hotkey callbacks to PtList widget. Is there something wrong there? And no,
I’m not changing any resources of list in my code, at least for now.
I really need to know how to add hotkey handler callbacks by code because
I’ll have to create some widgets by code in my application. Temporaly I’m
adding those callbacks by PhAB, but it really would help me if you know what
else I have to do to this work by code.
If I add hotkey callbacks of the same keys by code, it’s button1 which catch
the key event all the times, doesn’t matter which widget has the input
focus. Otherwise, if I add these by PhAB it works fine.
Could you send me your Hotkey callback code for each widget and maybe a test application (if possible). I can’t seem to reproduce the problem here.
Thanks
Rodney
Previously, Vanessa Shimada wrote in qdn.public.qnxrtp.photon:
Hi, Rodney!
list is a PtList widget. In that code I wrote I was only trying to add some
hotkey callbacks to PtList widget. Is there something wrong there? And no,
I’m not changing any resources of list in my code, at least for now.
I really need to know how to add hotkey handler callbacks by code because
I’ll have to create some widgets by code in my application. Temporaly I’m
adding those callbacks by PhAB, but it really would help me if you know what
else I have to do to this work by code.
If I add hotkey callbacks of the same keys by code, it’s button1 which catch
the key event all the times, doesn’t matter which widget has the input
focus. Otherwise, if I add these by PhAB it works fine.
Thanks in advance,
Vanessa
gui@qnx.com > escreveu na mensagem …
Hello Vanessa
What is list pointing to? Are you changing it somewhere else at all?
You have to specify a flag to your call of PtAddHotkeyHandler.
It is an undeocumented flag (which I wasn’t aware of) and it is
Pt_HOTKEY_CHAINED. Basically your call is going to look like this