Re: Delete a gtktextbuffer to fill it again

Hello Giant{colossus}!

--- Colossus <colossus 3000 it> wrote:
I use gtk_text_buffer_delete this way:

if (textbuf != NULL)
      gtk_text_buffer_get_start_iter (textbuf,&start);
      gtk_text_buffer_get_end_iter (textbuf,&end);
      gtk_text_buffer_delete (textbuf,&start,&end);
will invalidate all outstanding iterators
I fill the text gtk_text_buffer this way:
if (line != NULL) gtk_text_buffer_insert(textbuf,
&enditer, line, 
strlen( line ) );

I think your enditer is pointing to some absent
location, which is presently invalid.

You must get enditer via 


and then call,

gtk_text_buffer_insert(textbuf,&enditer, line, 
strlen( line ) );


Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]