how to instantiate PhAB windows programmatically

I’m working on an application where I need to open one or more (up to eight)
instances of a
window in response to operator input on a dialog. I can’t seem to find any
helper functions which
provide the same behavior as opening a window via PhAB using the
callback/module settings
dialog. In other words, rather than just being able to open one window in
response to a button
press, I need to open up to eight copies of the same window. This is needed
to display data and
status information up to eight devices of a similar type.

I understand that I can build the window(s) from the ground up, but I’d
prefer using the PhAB to
define the window’s layout, flags, data fields, etc. Hopefully I just
missed the example I need
in the help file :slight_smile:

TIA,

Dan Garber

dgarber@webcraft.com

Dan Garber <dgarber@webcraft.com> wrote:
: I’m working on an application where I need to open one or more (up to eight)
: instances of a
: window in response to operator input on a dialog. I can’t seem to find any
: helper functions which
: provide the same behavior as opening a window via PhAB using the
: callback/module settings
: dialog. In other words, rather than just being able to open one window in
: response to a button
: press, I need to open up to eight copies of the same window. This is needed
: to display data and
: status information up to eight devices of a similar type.

: I understand that I can build the window(s) from the ground up, but I’d
: prefer using the PhAB to
: define the window’s layout, flags, data fields, etc. Hopefully I just
: missed the example I need
: in the help file :slight_smile:

You need to use ApCreateModule(). Take a look at the “Internal Links and
Widget Databases” chapter of the Photon Programmer’s Guide. (The name
doesn’t make it obvious that this chapter is what you need to look at.
The chapter is now called “Accessing PhAB Modules from Code.”)

I hope this helps.


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

Steve-

Thanks, that was what I needed :slight_smile:

Dan


“Steve Reid” <stever@qnx.com> wrote in message
news:9pvem0$ak8$1@nntp.qnx.com

Dan Garber <> dgarber@webcraft.com> > wrote:
: I’m working on an application where I need to open one or more (up to
eight)
: instances of a
: window in response to operator input on a dialog. I can’t seem to find
any
: helper functions which
: provide the same behavior as opening a window via PhAB using the
: callback/module settings
: dialog. In other words, rather than just being able to open one window
in
: response to a button
: press, I need to open up to eight copies of the same window. This is
needed
: to display data and
: status information up to eight devices of a similar type.

: I understand that I can build the window(s) from the ground up, but I’d
: prefer using the PhAB to
: define the window’s layout, flags, data fields, etc. Hopefully I just
: missed the example I need
: in the help file > :slight_smile:

You need to use ApCreateModule(). Take a look at the “Internal Links and
Widget Databases” chapter of the Photon Programmer’s Guide. (The name
doesn’t make it obvious that this chapter is what you need to look at.
The chapter is now called “Accessing PhAB Modules from Code.”)

I hope this helps.


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