RE: GTK Trouble
- Posted by irv at take.maxleft.com Aug 20, 2002
- 529 views
Ron W wrote: > I figured out one solution. as it turns out, it was an address. So my > solution is. > > > function encrypt_textarea_0() > object address > integer len > integer start > sequence s > > start =0 > len = gtk_text_get_length(txt) > address=gtk_editable_get_chars(txt,start,len) > s=peek({address,len}) > > > printf(1,"%s",{s}) > return NULL > end function > constant encrypt_textarea=call_back(routine_id("encrypt_textarea_0")) > > I'm not sure it's how the lib was intended to be used, but it seems to > work. That should work. There's also a global function: c_to_eu_string(p) which takes a pointer to a null-terminated string, which GTK returns, and produces a Euphoria sequence. So you could replace the above with: printf(1,"%s",{c_to_eu_string(get_text(txt))}) I have updated the get_text() function to automatically do the conversion, and will post the new version to my website later today. Thanks, Irv