On 2018-03-16 20:22, Terry Reedy wrote:
On 3/16/2018 6:54 AM, Игорь Яковченко wrote:
[snip]
There is no item with such iid. This item has autogenerated iid just
like it's not specified.
I investigated problem and found that in ttk.py, Treeview.insert(...
iid=None, ...) in method's body has a check:
if iid:
res = self.tk.call(self._w, "insert", parent, index,
"-id", iid, *opts)
else:
res = self.tk.call(self._w, "insert", parent, index, *opts)
It means that if iid is "True" then use it else autogenerate it.
Maybe there should be "if iid is not None", not "if iid"? Or there are
some reasons to do check this way?
It might be that accepting '' as an iid would be a problem.
Our current tkinter expert, Serhiy Storchaka, should know. If so, "if
iid in (None, '')" would be needed.
The root of the tree has the iid ''.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com