Re: gtk_text_buffer_insert
- From: Gian Mario Tagliaretti <g tagliaretti gmail com>
- To: Aaron Yang <porsche1904 yahoo com>
- Cc: gtk-app-devel-list gnome org, gtk-list gnome org
- Subject: Re: gtk_text_buffer_insert
- Date: Sun, 9 Jan 2005 11:59:59 +0100
On Sun, 9 Jan 2005 02:40:48 -0800 (PST), Aaron Yang
<porsche1904 yahoo com> wrote:
>
> in the above program, only function1 prints, but not
> function2, and instead i got the following error:
>
If you insert a letter or whatever into the buffer all the iters you
have created before are not valid anymore, so you need to create new
iters and then insert other text in the buffer at their location.
> (a:3445): Gtk-WARNING **: Invalid text buffer
> iterator: either the iterator is uninitialized, or the
> characters/pixbufs/widgets in the buffer have been
> modified since the iterator was created.
> You must use marks, character numbers, or line numbers
> to preserve a position across buffer modifications.
> You can apply tags and insert marks without
> invalidating your iterators,
> but any mutation that affects 'indexable' buffer
> contents (contents that can be referred to by
> character offset)
> will invalidate all outstanding iterators
>
> (a:3445): Gtk-CRITICAL **: file gtktextbuffer.c: line
> 577 (gtk_text_buffer_insert): assertion
> `gtk_text_iter_get_buffer (iter) == buffer' failed
>
cheers
gmt
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]