"""If selop is not specified, returns selected items."""Īuthor: Serhiy Storchaka (serhiy.storchaka) *īut I like the idea to make the selection_*() methods conforming with the delete() and detach() methods in 3.6. selectionĭef selection(self, selop=None, items=None): My suggested fix is to add a statement to. Putting a single string in a tuple solves the problem, as in. ![]() ![]() This should have been the signature of the selection methods. The methods them pass the tuple of strings to tk. detach methods have signature '*items', meaning that each item is passed as a separate argument. The unofficial but generally helpful doc, says "The argument may be either a single iid or a sequence of iids." I would expect sequence mean a tuple of strings, not space-separated fields in a string (a tcl sequence). The doc string and doc do not define the form of 'items'. These are the only Treeview methods in which a single argument can be multiple items. Return self.tk.call(self._w, "selection", selop, items) Tree.insert('', 1, iid='a b', text='id with space')įile "F:\Python\mypy\tem.py", line 10, in įile "C:\Programs\Python35\lib\ tkinter\ttk.py", line 1415, in selection_toggleįile "C:\Programs\Python35\lib\ tkinter\ttk.py", line 1395, in selection selection_xyz(items) methods, which are all specializations of the. (IDLE displays TkVersion in Help => About IDLE.) However, on Win 10 (8.6.4), I was able to reproduce with all four of the. It is generally a good idea to mention OS, OS version, and Tk Version. A traceback is not a crash for the purpose of this tracker. Note that so far all other places in dealing with the item id's have no issue when there are spaces in them. ![]() These two lines of workaround code do work however. Traceback line numbers are 1415 then 1395Įither of these lines of code, where the item id is "2009 Report.pdf" crash Id's with spaces in them causes a crash when using the. Gbarnabic, ned.deily, python-dev, serhiy.storchaka, terry.reedyĬreated on 16:30 by gbarnabic, last changed 14:58 by admin.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |