John Finlay wrote:
Nemesis wrote:
On Fri, 25 Nov 2005 15:58:59 -0800
John Finlay <[EMAIL PROTECTED]> wrote:
I changed the code that way and now it works with the first
"on_iter_nth_child" I wrote. I still have a little doubt, the
references says that the methode on_get_iter should raise a
ValueError exception if the path is not valid. Should I add a "raise
ValueError" before the "return None" line?
You have confused on_get_iter() with TreeModel.get_iter() - two
different things.
Yes ... but isn't "on_get_iter" the method wich is called when
"get_iter" is used with my custom_list?
So if "get_iter" have to raise a ValueError with invalid paths I should
raise this ValueError in on_get_iter ... I think.
No. If there is a ValueError on_get_iter() will not be called.
I realized that my response was incorrect. You can raise an exception if
you want but it's not necessary since returning None will indicate that
the path was invalid and the GenericTreeModel code will return False
which will cause the get_iter() wrapper to raise the ValueError.
John
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/