How can I be notified when a dialog closes?

I know, just create a callback in PhAB. But what about the case where I
create the dialog from various point in my code with ApCreateModule()?
What I am actually trying to do here is pop up a (full screen) keyboard
on a touch screen for user input, and I don’t want to have a separate
instance of the keyboard for every time I use it, so I can’t put a code
callback in PhAB. If I could be notified when the user presses Enter
(which is linked to a Done callback), then I could just go and read the
contents of the text box in the keyboard dialog where the user input is.

Hope this makes sense. I guess I want something like a version of
ApCreateModule() that doesn’t return until the created dialog is closed
(or functional equivalent). Thanks.

Bruce Davis wrote:

I know, just create a callback in PhAB. But what about the case where I
create the dialog from various point in my code with ApCreateModule()?
What I am actually trying to do here is pop up a (full screen) keyboard
on a touch screen for user input, and I don’t want to have a separate
instance of the keyboard for every time I use it, so I can’t put a code
callback in PhAB. If I could be notified when the user presses Enter
(which is linked to a Done callback), then I could just go and read the
contents of the text box in the keyboard dialog where the user input is.

Hope this makes sense. I guess I want something like a version of
ApCreateModule() that doesn’t return until the created dialog is closed
(or functional equivalent). Thanks.

Hi
look at the functions
PtModalBlock()
and PtModalUnblock()
should do what you are asking for.

Bruce Davis <bruce.r.davis@boeing.com> wrote:
: I know, just create a callback in PhAB. But what about the case where I
: create the dialog from various point in my code with ApCreateModule()?
: What I am actually trying to do here is pop up a (full screen) keyboard
: on a touch screen for user input, and I don’t want to have a separate
: instance of the keyboard for every time I use it, so I can’t put a code
: callback in PhAB. If I could be notified when the user presses Enter
: (which is linked to a Done callback), then I could just go and read the
: contents of the text box in the keyboard dialog where the user input is.

: Hope this makes sense. I guess I want something like a version of
: ApCreateModule() that doesn’t return until the created dialog is closed
: (or functional equivalent). Thanks.

Dialogs are instantiated as PtWindow widgets. Would a Pt_CB_WINDOW_CLOSING
callback do what you want?


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems