Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Problem with PtGetResource: (3 Items)
   
Problem with PtGetResource  
hi guys... im still developing in photon.. and i have a weird problem.. im trying to get the data from a text and put it
 into another text ..in the text string (ABW_Texto1) i have "test", but when i use the callback i get only trash to the 
other text... i hope u can help me.. thanks

this is my callback

int
Enviar( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo ){
	char a_message[30];

	/* eliminate 'unreferenced' warnings */
	widget = widget, apinfo = apinfo, cbinfo = cbinfo;
	
	PtGetResource (ABW_Texto1, Pt_ARG_TEXT_STRING, a_message, 0);

        PtSetResource (ABW_Texto2, Pt_ARG_TEXT_STRING, a_message,0);
	

	return( Pt_CONTINUE );

	}
RE: Problem with PtGetResource  
Hi Jorge. Please read the documentation before posting for the whole
community. I'm sure this will make things more efficient for you and
everybody else involved at this end. 

You are not calling PtGetResource with a correct 3rd parameter. How to
call this function is explained in the Photon Library Reference.

Regards,
Max

-----Original Message-----
From: Jorge Inostroza [mailto:community-noreply@qnx.com] 
Sent: Monday, September 22, 2008 12:04 PM
To: momentics-community
Subject: Problem with PtGetResource

hi guys... im still developing in photon.. and i have a weird problem..
im trying to get the data from a text and put it into another text ..in
the text string (ABW_Texto1) i have "test", but when i use the callback
i get only trash to the other text... i hope u can help me.. thanks

this is my callback

int
Enviar( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo
){
	char a_message[30];

	/* eliminate 'unreferenced' warnings */
	widget = widget, apinfo = apinfo, cbinfo = cbinfo;
	
	PtGetResource (ABW_Texto1, Pt_ARG_TEXT_STRING, a_message, 0);

        PtSetResource (ABW_Texto2, Pt_ARG_TEXT_STRING, a_message,0);
	

	return( Pt_CONTINUE );

	}


_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post13776
Re: RE: Problem with PtGetResource  
yes .. i knew my problem was there.. i forget the address pointer... thanks for the help.. and sorry for bothering