Howdy,
I’m having some trouble setting the Pt_ARG_FLAGS using
the function PtSetResource (or with PtSetResources) in
the following simple example (from the QNX documentation) :
int main( int argc, char *argv[] )
{
PtWidget_t *window,*widget;
PtArg_t args[1];
long flags;
if ((window = PtAppInit(NULL, &argc, argv, 0, NULL))
== NULL)
PtExit(1);
PtSetArg(&args[0], Pt_ARG_TEXT_STRING,
“hello world”, 0);
widget = PtCreateWidget(PtButton, window, 1, args);
PtRealizeWidget(window);
PtGetResource(widget,Pt_ARG_FLAGS,&flags,0);
printf("%ld\n",flags);
flags |= Pt_GHOST | Pt_BLOCKED;
printf("%ld\n",flags);
PtSetResource(widget,Pt_ARG_FLAGS,flags,0);
PtGetResource(widget,Pt_ARG_FLAGS,&flags,0);
printf("%ld\n",flags);
PtMainLoop();
return (EXIT_SUCCESS);
}
When I ran this short app, the value of the Pt_ARG_FLAGS
is not changed by PtSetResource. I probably do something
wrong, but I can’t see what or why …
Thanks for any tips/helps/suggestions
Regards,
jean-louis