Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Hep wih PhAB !!: (3 Items)
   
Hep wih PhAB !!  
Hi.. im new in this forum, and also im new in photon app builder, so im
creating an interface that listen a udp socket from a server, but first i
need to use some functions related with callbacks to the widgets... so my
first question is... how by pushing a button can i get the phrase "Hello
World" into a multitext ??

what am trying to do is creating an arm callback in the button, so when i
push the button using the function PtSetResouce  change the string, but only
i change the string into the button, so i need to put that string into a
multitext... can anybody help me with that please :)

my code is PtSetResouce(widget, Pt_ARG_TEXT_STRING, "Hello World", 0);
and what im trying to do is PtSetResouce((PtWidget_t
*)(AbContext.Ap_classtab[2].wclass)Pt_ARG_TEXT_STRING, "Hello World", 0);

where Ap_classtab[2] is the structure where i have the multitext widget

thanks
JIN

-- 
"Podran criticarme por fallar... pero no por dejar de intentarlo"
RE: Hep wih PhAB !!  
Hi Jorge. You don't want to be messing with the AbContext widget class
structure. To set a resource on a widget in your PhAB application, use
that widget's ABW_* manifest. Read the "Working With Code" chapter of
the Photon Programmer's guide for more information.

Regards,
Max 

-----Original Message-----
From: Jorge Inostroza [mailto:community-noreply@qnx.com] 
Sent: Wednesday, September 10, 2008 11:13 AM
To: momentics-community
Subject: Hep wih PhAB !!

Hi.. im new in this forum, and also im new in photon app builder, so im
creating an interface that listen a udp socket from a server, but first
i
need to use some functions related with callbacks to the widgets... so
my
first question is... how by pushing a button can i get the phrase "Hello
World" into a multitext ??

what am trying to do is creating an arm callback in the button, so when
i
push the button using the function PtSetResouce  change the string, but
only
i change the string into the button, so i need to put that string into a
multitext... can anybody help me with that please :)

my code is PtSetResouce(widget, Pt_ARG_TEXT_STRING, "Hello World", 0);
and what im trying to do is PtSetResouce((PtWidget_t
*)(AbContext.Ap_classtab[2].wclass)Pt_ARG_TEXT_STRING, "Hello World",
0);

where Ap_classtab[2] is the structure where i have the multitext widget

thanks
JIN

-- 
"Podran criticarme por fallar... pero no por dejar de intentarlo"


_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post13158
Re: RE: Hep wih PhAB !!  
yes i did that and it works :D.. thanks for the help... now what im trying to do is put message from an udp socket.. so 
i created a thread to send the messages but still dont know how to put the string into a multitext.. what ive been 
trying to do is.. for example

char buffer[100] = "Hello World";

PtSetResource(ABW_Multitext1, Pt_ARG_TEXT_STRING, buffer, 0);

this is a fragment of an arm callback of a botton

so help me if u can .. thanks

PD: ill put another topic .. please mods dont delete it.. i need this help with urgency