Setting Pt_ARG_HELP_TOPIC

I’ve got a PhAB app (for Photon 1.14) and I wish to set the
Pt_ARG_HELP_TOPIC string for various widgets dynamically at runtime.
I’ve got some code that runs, but doesn’t work.

void setUpHelp( void ) {
PtArg_t Darg;
char myHelpStr[1024];

strcpy(myHelpStr, “Internal Help String”);
PtSetArg(&Darg, Pt_ARG_HELP_TOPIC, myHelpStr,
strlen(myHelpStr));
PtSetResources(ABW_ActionBtn, 1, &Darg);

// other widgets would follow…

return;
}

I tried doing a PtGetResources and that doesn’t return what I’d expect.
All of the widgets have only one instance (they are all in dialogs), but
none are actually realized at the time this code is executed. Is this
the reason why this doesn’t work, or am I missing something?

TIA,

Lance Held

Software Engineer - Nanogen, Inc.
voice: (858) 410-4740
fax: (858) 410-4848
mailto:lheld@nanogen.com
http://www.nanogen.com

Hi Lance,

sorry for the late response. With it being help topics are you setting up the
for the window to handle the help topic. You can do this by setting in the
Pt_ARG_WINDOW_RENDER_FLAGS resource the flag for Ph_WM_RENDER_HELP. And the
Pt_ARG_WINDOW_MANAGED_FLAGS resource the flag for Ph_WM_HELP. This will give a
small question mark icon on the window bar. When you click on the question mark
and then on the widget the help topic should be displayed.

Regards
Brenda


Lance Held <lheld@nanogen.com> wrote:

I’ve got a PhAB app (for Photon 1.14) and I wish to set the
Pt_ARG_HELP_TOPIC string for various widgets dynamically at runtime.
I’ve got some code that runs, but doesn’t work.

void setUpHelp( void ) {
PtArg_t Darg;
char myHelpStr[1024];

strcpy(myHelpStr, “Internal Help String”);
PtSetArg(&Darg, Pt_ARG_HELP_TOPIC, myHelpStr,
strlen(myHelpStr));
PtSetResources(ABW_ActionBtn, 1, &Darg);

// other widgets would follow…

return;
}

I tried doing a PtGetResources and that doesn’t return what I’d expect.
All of the widgets have only one instance (they are all in dialogs), but
none are actually realized at the time this code is executed. Is this
the reason why this doesn’t work, or am I missing something?

TIA,

Lance Held

Software Engineer - Nanogen, Inc.
voice: (858) 410-4740
fax: (858) 410-4848
mailto:> lheld@nanogen.com
http://www.nanogen.com