【发布时间】:2014-07-19 07:22:25
【问题描述】:
我有一个TextView,我想自动将所有键入、粘贴等的文本转换为大写,可以吗?我尝试添加一个bufferInsertText 处理程序并自己从那里插入文本,但此错误消息不断弹出:
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
【问题讨论】: