(SideCoreVala:1212): 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)
editButton.Clicked += newEventHandler(onButtonEditClicked);
buttonAnchor = buffer.CreateChildAnchor(ref insertIter); //*** <--- by ref here
The LinkButton is just a Gtk.Button with a place to store info of an Entity.
I've tried to copy the TextIterator and pass the copy when creating the anchor, but that doesn't solve the issue. Does anyone know the correct way to do this? Thanks for any direction you're able to provide.
RE: Vala runtime error when inserting child button on Gtk.TextView
I was able to find a solution to my problem. In Vala, after inserting the child button I re-set the TextIterator to the end position of the TextBuffer. Seems to have solved the issue. Here is the updated code: