PtButton's Pt_SET attribute fails using Pt_CB_Activate via m

I have a function attached to PtButton’s Pt_CB_Activate:

int Edit_Description_CB( PtWidget_t *widget, ApInfo_t *apinfo,
PtCallbackInfo_t *cbinfo )

{ PtArg_t args[2]

PtSetArg(&args[0], Pt_ARG_FLAGS, Pt_FALSE, Pt_SET);

PtSetResources(widget, 1, args);

return( Pt_CONTINUE );

}

I made sure this piece of code run when a mouse click on the button, but the
Button stays UnSet, what’s going on here???

If I attach the same function to a HotKey callback, it works!

This is exactly what your code tells it to do. I guess you wanted this:
PtSetResource( widget, Pt_ARG_FLAGS, Pt_TRUE, Pt_SET );
-Misha.
“Ran Zhang” <rzhang@vamcointernational.com> wrote in message
news:cac8ad$p1m$3@inn.qnx.com

I have a function attached to PtButton’s Pt_CB_Activate:

int Edit_Description_CB( PtWidget_t *widget, ApInfo_t *apinfo,
PtCallbackInfo_t *cbinfo )

{ PtArg_t args[2]

PtSetArg(&args[0], Pt_ARG_FLAGS, Pt_FALSE, Pt_SET);

PtSetResources(widget, 1, args);

return( Pt_CONTINUE );

}

I made sure this piece of code run when a mouse click on the button, but
the
Button stays UnSet, what’s going on here???

If I attach the same function to a HotKey callback, it works!

\

oops! the code i Had is Pt_ARG_FLAGS, Pt_TRUE, Pt_SET , but the

Button stays UnSet. why?

“Misha Nefedov” <mnefedov@qnx.com> wrote in message
news:cac9jg$q1r$1@inn.qnx.com

This is exactly what your code tells it to do. I guess you wanted this:
PtSetResource( widget, Pt_ARG_FLAGS, Pt_TRUE, Pt_SET );
-Misha.
“Ran Zhang” <> rzhang@vamcointernational.com> > wrote in message
news:cac8ad$p1m$> 3@inn.qnx.com> …
I have a function attached to PtButton’s Pt_CB_Activate:

int Edit_Description_CB( PtWidget_t *widget, ApInfo_t *apinfo,
PtCallbackInfo_t *cbinfo )

{ PtArg_t args[2]

PtSetArg(&args[0], Pt_ARG_FLAGS, Pt_FALSE, Pt_SET);

PtSetResources(widget, 1, args);

return( Pt_CONTINUE );

}

I made sure this piece of code run when a mouse click on the button, but
the
Button stays UnSet, what’s going on here???

If I attach the same function to a HotKey callback, it works!



\