Re: Delete a gtktextbuffer to fill it again
- From: Muthiah Annamalai <dearestchum yahoo co in>
- To: Colossus <colossus 3000 it>, gtk-app-devel-list gnome org
- Cc:
- Subject: Re: Delete a gtktextbuffer to fill it again
- Date: Tue, 14 Jun 2005 03:01:25 -0700 (PDT)
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
[SNIP]
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
gtk_text_buffer_get_end_iter(textbuf,&enditer);
and then call,
gtk_text_buffer_insert(textbuf,&enditer, line,
strlen( line ) );
Cheers
Muthu.
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]