RE: GTK Trouble

new topic     » topic index » view thread      » older message » newer message

I've also tried this it doesnt seem to 
work either.  But at least I don't get a 
seg fault.  It looks as though I might 
be getting a pointer values, maybe.

function encrypt_textarea_0()
    object str
    integer len
    integer start

    start =0
    len = gtk_text_get_length(txt)
    str=gtk_editable_get_chars(txt,start,len)

    printf(1,"%s",str)
    return NULL
end function
constant encrypt_textarea=call_back(routine_id("encrypt_textarea_0"))

Ron W wrote:
> I'm having a little trouble with the gtk lib.  I made this function...
> 
> function encrypt_textarea_0()
>     object str
>     str=get_text(txt)
>     printf(1,"%s",str)
>     return NULL
> end function
> constant encrypt_textarea=call_back(routine_id("encrypt_textarea_0"))
> 
> when I click on the button that calls this funtion I get....
> 
> Gtk-CRITICAL **: file gtkentry.c: line 535 (gtk_entry_get_text): 
> assertion `GTK_IS_ENTRY (entry)' failed.
> Segmentation fault
> 
> from looking at the error, it looks like get_text is for a GtkEntry 
> widget and not a GtkText object.  so my question is ...
> 
> how do you get the contents of a GtkText widget a store them in a 
> sequence?
> 
> Ron_W
> 
>

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu