View topic - get name widget in action

get name widget in action

anything that doesn't fit to other groups.

get name widget in action

Postby d1gger » Wed Jun 09, 2010 8:16 pm

Hi I have widgets: PtText1,PtText2,PtText3 ... and i want use the same function on each widgets. The function must get name widget for example PtText1 split this String and return only numer in this case "1". And get value from PtText1(for example "0") and set this value in variable like this pgmData[1] = 0;

myfunction(PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo)


pgmData[???] = ???

widget = widget,apinfo = apinfo,cbingo = cbinfo;
New Member
Posts: 8
Joined: Thu May 27, 2010 7:52 pm

RE: get name widget in action

Postby maschoen » Sun Jun 13, 2010 1:18 pm

All widgets have a generic "data" resource. You could set this resource, for example to 1 for PtText1 at initalization time and read it back in your function. An alternative would be to have a callback for each widget. That callback would call your function but with a fourth parameter.
QNX Master
Posts: 2720
Joined: Wed Jun 25, 2003 5:18 pm

Return to General Programming

Who is online

Users browsing this forum: No registered users and 2 guests