Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - PtSetResource -> PtImmortalizeWidget: Page 1 of 6 (6 Items)
   
PtSetResource -> PtImmortalizeWidget  
Hi,

I try to set the text from a normal application to a photon label in a photon window. I can see the label and other 
textfields, when I start the photon application. Input_proc is a message handler, which receives the messages from my 
normal application. I use a message channel with name_attach. This works, at least the "OK!" string is returned and 
print out by the normal application. The printf "Photon input .... Is not shown. When I try to change the text (msg 
receive) within a label or textfield, I get a memory violation from PtImmortalizeWidget. I have no idea what this means 
and how to get it running. Can someone help me with that?



 Sourcecode from abmain.c (exe=lcdPhoton)
70 int input_proc(void *client_data, pid_t pid, void *msg,
 71                size_t msglen)
 72 {
 73
 74     struct MyMsg* mymsg = (struct MyMsg *) msg;
 75
 76     printf("Photon input message called");
 77
 78     MsgReply(pid,0, "OK!", 4);
 79 //  PtHold();
 80     //  PtSetResource(widget, type, value, len);
 81 //  PtTextModifyText(ABW_PtText1, 0,0 , -1, "wos is", 6);
 82     PtSetResource(ABW_PtLabel0, Pt_ARG_TEXT_STRING, "wos is" /* mymsg->data */, 0);
 83 //  PtRelease();
 84     PtFlush();
88  return Pt_CONTINUE;
 89 }




Command line output

1message send ok
2reply : OK!
3
4Process 294935 (lcdPhoton) terminated SIGSEGV code=1 fltno=11 ip=011db640(libph.
5so.3@PtImmortalizeWidget+0x0) mapaddr=000db640. ref=00000064


Chris