View topic - question about PtSetResoruce&PtSetResource

question about PtSetResoruce&PtSetResource

Isn't the name clear?

question about PtSetResoruce&PtSetResource

Postby bzxaggio » Sat Nov 13, 2010 12:52 am

I would like to achieve that after input some string in the PtText and then read this string once press a button, at last output this string to PtLabel. The callback code as follows:

char *text;
PtGetResource(ABW_datatext_1, Pt_ARG_TEXT_STRING, &text, 0);

PtSetResource(ABW_label, Pt_ARG_TEXT_STRING, *text, 0);


but when I run it, once click the button, the whole window will close, problem comes from PtSetResource, but I do not know how to fix it, thank you for your help.
Active Member
Posts: 16
Joined: Tue Aug 24, 2010 10:09 pm
Location: CHI

RE: question about PtSetResoruce&PtSetResource

Postby maschoen » Mon Nov 15, 2010 7:21 pm

Try this:

PtSetResource(ABW_label, Pt_ARG_TEXT_STRING, text, 0);
QNX Master
Posts: 2683
Joined: Wed Jun 25, 2003 5:18 pm

Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 2 guests