Christian Lechner
|
PtSetResource -> PtImmortalizeWidget
|
Christian Lechner
06/24/2010 5:16 AM
post57756
|
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
|
|
|