CellRendererText validation



Hi!

I'm trying to implement an editable cell in a treeview.
It's a CellRendererText, but in the model it is actually not a string,
but has string representation. When the user edits the cell, I must
check it.
If the check fails, it shouldn't allow me to leave the field, but tell
me what's wrong.

So, I begin to edit the cell, type in a lot of cool stuff.
Then, I try to leave the cell, but the cell's content is not valid.
Falling back to the last good value is not a solution for me, I want
to get a message about the invalid entry and keep editing the field.
How can I achieve this?

In fact, it is a Regexp, and I'm coding in ruby, but that's not the point.
--
+-[ Gergely Kontra <kgergely mcl hu> http://www.mcl.hu/~kgergely ]------+
| PhD Student (Room:IB113)  PGP ID: 0x7E3846BF  Mobile:(+36 20)356 9656 |
| Budapest University of Technology and Economics        ICQ# 175564914 |
+------------- "Olyan langesz vagyok, hogy poroltoval kellene jarnom!" -+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]