Pop up dialog window

Hi,

I would like to have a dialog window pop up at a certain time interval
and time-out and disappear. The only way I can think of doing this is by
hiding a button somewhere and using an event timer to have the button
‘press’ itself setting off the activate callback where a dialog module
is attached. This is not very elegant.

Is there a way to have a dialog window realize itself and then destroy
itself?

Also, I was wondering if there is a way to have a widget cause a
callback for another widget.

Help on this would be greatly appreciated.
Alec

Hello Alec,

see below.

“Alec Gorjestani” <alecg@me.umn.edu> wrote in message
news:3DB6C33B.2080806@me.umn.edu

Hi,

I would like to have a dialog window pop up at a certain time interval
and time-out and disappear. The only way I can think of doing this is by
hiding a button somewhere and using an event timer to have the button
‘press’ itself setting off the activate callback where a dialog module
is attached. This is not very elegant.

Is there a way to have a dialog window realize itself and then destroy
itself?

You could setup a timer and use the ApCreateModule() to bring up your dialog
as long as you have used PhAB to create your dialog and created your
internal link. You could also use the same timer to unrealize the widget as
well. For this you could use PtUnrealizeWidget() or PtDestroyWidget(). For
more information on this you can take a look at the documentation found at
http://www.qnx.com/developer/docs/momentics_nc_docs/photon/prog_guide/module
s.html

Also, I was wondering if there is a way to have a widget cause a
callback for another widget.

You could attach to the same callback from both widgets if that’s what you
mean.

I hope this helps.

Regards,
Dave B.

Help on this would be greatly appreciated.
Alec

Thanks for the suggestion.

I implemented the ApCreateModule() approach and the dialog window does
appear. However, none of the widgets inside the window are drawn. The
window has a color fill, but it is transparent. I am able to
successfully destroy the dialog.

Any ideas as to what’s causing this?
Alec


Applications Support wrote:

Hello Alec,

see below.

“Alec Gorjestani” <> alecg@me.umn.edu> > wrote in message
news:> 3DB6C33B.2080806@me.umn.edu> …

Hi,

I would like to have a dialog window pop up at a certain time interval
and time-out and disappear. The only way I can think of doing this is by
hiding a button somewhere and using an event timer to have the button
‘press’ itself setting off the activate callback where a dialog module
is attached. This is not very elegant.

Is there a way to have a dialog window realize itself and then destroy
itself?


You could setup a timer and use the ApCreateModule() to bring up your dialog
as long as you have used PhAB to create your dialog and created your
internal link. You could also use the same timer to unrealize the widget as
well. For this you could use PtUnrealizeWidget() or PtDestroyWidget(). For
more information on this you can take a look at the documentation found at
http://www.qnx.com/developer/docs/momentics_nc_docs/photon/prog_guide/module
s.html


Also, I was wondering if there is a way to have a widget cause a
callback for another widget.


You could attach to the same callback from both widgets if that’s what you
mean.

I hope this helps.

Regards,
Dave B.


Help on this would be greatly appreciated.
Alec
\

Look into ApCreateDBWidgetFamily().

chris

Alec Gorjestani <alecg@me.umn.edu> wrote:

Thanks for the suggestion.

I implemented the ApCreateModule() approach and the dialog window does
appear. However, none of the widgets inside the window are drawn. The
window has a color fill, but it is transparent. I am able to
successfully destroy the dialog.

Any ideas as to what’s causing this?
Alec


Applications Support wrote:
Hello Alec,

see below.

“Alec Gorjestani” <> alecg@me.umn.edu> > wrote in message
news:> 3DB6C33B.2080806@me.umn.edu> …

Hi,

I would like to have a dialog window pop up at a certain time interval
and time-out and disappear. The only way I can think of doing this is by
hiding a button somewhere and using an event timer to have the button
‘press’ itself setting off the activate callback where a dialog module
is attached. This is not very elegant.

Is there a way to have a dialog window realize itself and then destroy
itself?


You could setup a timer and use the ApCreateModule() to bring up your dialog
as long as you have used PhAB to create your dialog and created your
internal link. You could also use the same timer to unrealize the widget as
well. For this you could use PtUnrealizeWidget() or PtDestroyWidget(). For
more information on this you can take a look at the documentation found at
http://www.qnx.com/developer/docs/momentics_nc_docs/photon/prog_guide/module
s.html


Also, I was wondering if there is a way to have a widget cause a
callback for another widget.


You could attach to the same callback from both widgets if that’s what you
mean.

I hope this helps.

Regards,
Dave B.


Help on this would be greatly appreciated.
Alec


\


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/