Re: Re: Invalid TextBuffer iterator
- From: "Dmitry Kruglov" <lsd secy biz>
- To: gtkmm-list gnome org
- Subject: Re: Re: Invalid TextBuffer iterator
- Date: Mon, 10 Dec 2012 16:01:37 +0100
Hello.
This example:
Gtk::TextView* p_text_edit = 0;
Glib::RefPtr<Gtk::TextBuffer> p_tb_result;
p_tb_result = Gtk::TextBuffer::create();
p_tb_result->set_text("Hello ch01 cout gmail com");
p_text_edit->set_buffer(p_tb_result);
Best Regdrs, Dmitry.
--- оригинальное сообщение ---
От: ch01 <ch01 cout gmail com>
Дата: 07.12.2012 10:12:45
Кому: gtkmm-list gnome org
Тема: Re: Invalid TextBuffer iterator
>
>
>
> Yann LEYDIER wrote:
> >
> > Hi,
> >
> > I think there is no need to create a new TextBuffer, you could just
>
> > write (and that's what I did in an application that uses a TextView
>
> > whithout crashing):
> > m_refTextBuffer = get_buffer();
> >
> > Or maybe creating the Mark after linking the TextBuffer to the TextView
>
> > would do the trick…
> >
> > yann
> >
> > On 07/12/12 09:26, ch01 wrote:
> >>
> >> Hi, I get an error when inserting and scrolling the Gtk::TextBuffer,
> when
> >> i
> >> get the error the program sometimes crashes. This is the error i
> get:
> >>
> >> 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
> >>
> >> ---------------------------------------------------------------------------------------
> >> Here's my source code: http://pastebin.com/jrVCU8pm.
> >> I have tried all my best to fix it, but i just couldn't. Any sort
> of help
> >> would be appreciated.
> >>
> > _______________________________________________
> > gtkmm-list mailing list
> > gtkmm-list gnome org
> > https://mail.gnome.org/mailman/listinfo/gtkmm-list
> >
> >
>
> I have modified the code to your suggestions but still no changes i still
> get the same error :( .
> here's the modified code: http://pastebin.com/jrVCU8pm
> --
> View this message in context: http://old.nabble.com/Invalid-TextBuffer-iterator-tp34769943p34770071.html
> Sent from the Gtkmm mailing list archive at Nabble.com.
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> https://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]