arrggg.. now my app responds to hotkeys too well...

i have an app with a child dialog that pops up when you hit a hot key
and ive managed to make the hot keys active on the child when it is in
focus… the problem i am having now is that if the child is in focus
the hotkey call back fires in the child (good) AND in the parent
(bad)… how to i tell this @#$* thing to only process hotkey callbacks
in the focused dialog??

ive probably set some flag in the parent but for the life of me i cant
figure out which one i messed with…


vince

vince <vgeisler@engineer.com> wrote:

i have an app with a child dialog that pops up when you hit a hot key
and ive managed to make the hot keys active on the child when it is in
focus… the problem i am having now is that if the child is in focus
the hotkey call back fires in the child (good) AND in the parent
(bad)… how to i tell this @#$* thing to only process hotkey callbacks
in the focused dialog??

You can’t win for trying, eh Vince? :slight_smile:

Check the Pt_ARG_CONTAINER_FLAGS resource of your child dialog –
I’d bet that the Pt_HOTKEY_TERMINATOR bit is not set. All
containers-class widgets have the flag and bit (clear by default,
if memory servers). If you set the bit, any hotkeys which
started out at a widget within this container will not be allowed
to propagate up the widget family tree beyond the container widget.

ive probably set some flag in the parent but for the life of me i cant
figure out which one i messed with…

Nope, default behaviour. You can tell the judge you’re not
guilty.


Norbert Black
QSSL Training Services

On 11 Jan 2001 23:21:29 GMT, Norbert Black <nblack@qnx.com> wrote:

vince <> vgeisler@engineer.com> > wrote:
i have an app with a child dialog that pops up when you hit a hot key
and ive managed to make the hot keys active on the child when it is in
focus… the problem i am having now is that if the child is in focus
the hotkey call back fires in the child (good) AND in the parent
(bad)… how to i tell this @#$* thing to only process hotkey callbacks
in the focused dialog??

You can’t win for trying, eh Vince? > :slight_smile:

Check the Pt_ARG_CONTAINER_FLAGS resource of your child dialog –
I’d bet that the Pt_HOTKEY_TERMINATOR bit is not set. All
containers-class widgets have the flag and bit (clear by default,
if memory servers). If you set the bit, any hotkeys which
started out at a widget within this container will not be allowed
to propagate up the widget family tree beyond the container widget.

that was it! geez… i SWEAR that flag wasn’t there 5 min ago…it

just popped in there after you pointed it out… how’d you do that,
that’s a neat trick…



thanks for putting on the cape to swoop in from the sky to save me :slight_smile:

vince



ive probably set some flag in the parent but for the life of me i cant
figure out which one i messed with…

Nope, default behaviour. You can tell the judge you’re not
guilty.


Norbert Black
QSSL Training Services

vince <vgeisler@engineer.com> wrote:

On 11 Jan 2001 23:21:29 GMT, Norbert Black <> nblack@qnx.com> > wrote:

vince <> vgeisler@engineer.com> > wrote:
[snip]
Check the Pt_ARG_CONTAINER_FLAGS resource of your child dialog –
[snip]

that was it! geez… i SWEAR that flag wasn’t there 5 min ago…it
just popped in there after you pointed it out… how’d you do that,
that’s a neat trick…

With great power comes the possibility to really mess with
peoples’ minds… :slight_smile: It’s astonishing how I can alter the
software just by concentrating.

thanks for putting on the cape to swoop in from the sky to save me > :slight_smile:

No worries. Just pass on the favour to the next guy in line (as
I think I’ve seen you doing in a couple of threads recently).



Norbert Black
QSSL Training Services

On 12 Jan 2001 14:33:09 GMT, Norbert Black <nblack@qnx.com> wrote:

vince <> vgeisler@engineer.com> > wrote:
On 11 Jan 2001 23:21:29 GMT, Norbert Black <> nblack@qnx.com> > wrote:

vince <> vgeisler@engineer.com> > wrote:
[snip]
Check the Pt_ARG_CONTAINER_FLAGS resource of your child dialog –
[snip]

that was it! geez… i SWEAR that flag wasn’t there 5 min ago…it
just popped in there after you pointed it out… how’d you do that,
that’s a neat trick…

With great power comes the possibility to really mess with
peoples’ minds… > :slight_smile: > It’s astonishing how I can alter the
software just by concentrating.

thanks for putting on the cape to swoop in from the sky to save me > :slight_smile:

No worries. Just pass on the favour to the next guy in line (as
I think I’ve seen you doing in a couple of threads recently).

will do… im still learning but if i know i always share the
knowledge… the more i know the more i share…

vince…


Norbert Black
QSSL Training Services