| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
|
||
| .. FIXME: The following keyword arguments are currently recognized: | ||
|
|
||
| Methods inheritted from :class:`Misc` parent class (some methods ommited): |
There was a problem hiding this comment.
Spelling: inherited; omitted
Sorry, something went wrong.
There was a problem hiding this comment.
| Methods inheritted from :class:`Misc` parent class (some methods ommited): | |
| Methods inherited from :class:`!Misc` parent class (some methods omited): |
Made spelling fixes; Added ! to Misc since there is not such doc section.
Sorry, something went wrong.
|
|
||
| .. method:: destroy() | ||
|
|
||
| Destroy this and all descendants widgets. This will |
There was a problem hiding this comment.
all descendant widgets [without the trailing s]
Sorry, something went wrong.
There was a problem hiding this comment.
| Destroy this and all descendants widgets. This will | |
| Destroy this and all descendant widgets. This will |
Sorry, something went wrong.
| @@ -0,0 +1,4 @@ | |||
| Added most (not all) of the methods for the `Tkinter.Tk` class. | |||
There was a problem hiding this comment.
Lowercase t for tkinter?
Sorry, something went wrong.
There was a problem hiding this comment.
3.x module name is tkinter (was Tkinter before)
| Added most (not all) of the methods for the `Tkinter.Tk` class. | |
| Added most (not all) of the methods for the `tkinter.Tk` class. |
Sorry, something went wrong.
|
|
||
| Call function once after given time. | ||
|
|
||
| MS specifies the time in milliseconds. FUNC gives the |
There was a problem hiding this comment.
Parameter names are normally marked up in italics rather than all caps, i.e. *Ms* and *Func* in this case. See my createfilehandler entry at the bottom, or the other Python RST documentation files for examples.
Sorry, something went wrong.
There was a problem hiding this comment.
| MS specifies the time in milliseconds. FUNC gives the | |
| *Ms* specifies the time in milliseconds. *Func* is the function |
Sorry, something went wrong.
| .. method:: after_idle(func, *args) | ||
|
|
||
| Call FUNC once if the Tcl main loop has no event to | ||
| process. |
There was a problem hiding this comment.
This is more of a complaint about the original docstring, but the if suggests the function may not be called. I would drop it and write "Call func once the main loop has no event . . ."
Sorry, something went wrong.
There was a problem hiding this comment.
The suggestion should have been attached to the previous line. To implement the suggestion, I have to attach it there.
Sorry, something went wrong.
| whether this is a topmost window (displays above all other | ||
| windows). | ||
|
|
||
| On Macintosh, XXXXX |
There was a problem hiding this comment.
I guess this line could be removed
Sorry, something went wrong.
There was a problem hiding this comment.
No. There are attributes common to all systems, 1 common to Windows and Mac, and specific ones for each system. Revision needed. https://www.tcl.tk/man/tcl8.6/TkCmd/wm.html
Sorry, something went wrong.
|
|
||
| Store VALUE in WM_COMMAND property. It is the command | ||
| which shall be used to invoke the application. Return current | ||
| command if VALUE is None. |
There was a problem hiding this comment.
Copy and paste mistake?
Sorry, something went wrong.
|
|
||
| .. method:: geometry(newGeometry=None) | ||
|
|
||
| Set geometry to NEWGEOMETRY of the form =widthxheight+x+y. Return |
There was a problem hiding this comment.
Would be nice to mark up or otherwise differentiate the variables from the syntax. E.g. the TK manual uses italic width, height, x and y.
Sorry, something went wrong.
There was a problem hiding this comment.
Minimal change:
| Set geometry to NEWGEOMETRY of the form =widthxheight+x+y. Return | |
| Set geometry to *newGeometry* of the form =widthxheight+x+y. Return |
Sorry, something went wrong.
| .. method:: manage(widget) | ||
|
|
||
| The widget specified will become a stand alone top-level window. | ||
| The window will be decorated with the window managers title bar, |
There was a problem hiding this comment.
Apostrophe for window manager's
Sorry, something went wrong.
There was a problem hiding this comment.
| The window will be decorated with the window managers title bar, | |
| The window will be decorated with the window manager's title bar, |
Sorry, something went wrong.
| Return the function bound to NAME if None is given. NAME could be | ||
| e.g. "WM_SAVE_YOURSELF" or "WM_DELETE_WINDOW". | ||
|
|
||
| .. method:: resizable(widht=None, height=None) |
There was a problem hiding this comment.
Spelling: width
Sorry, something went wrong.
There was a problem hiding this comment.
| .. method:: resizable(widht=None, height=None) | |
| .. method:: resizable(width=None, height=None) |
Sorry, something went wrong.
There was a problem hiding this comment.
The doc for a particular widget should have none of the inherited methods and all of the added methods. The inherited methods should be documented and listed just once and referenced from each widget. The NMT Shipman docs called the inherited methods (at least those in Misc) 'Universal methods'. We need similar redundancy avoidance in our docs.
@Hpmason Martin made numberous specific suggestions. Do you plan to respond, or was this a one-shot contribution?
@vadmium If you had used the 'Insert a suggestion' feature, the first icon on the top row of icons, then I believe I as well as OP Hpmason could just clisk 'Accept' for each one.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
|
Sorry, I have been busy with work and have not had the chance to go over the suggested edits. |
Sorry, something went wrong.
|
@Hpmason Please do not delete your branch if you have not yet. Serhiy, the main tkinter maintainer, just indicated an interest in reviewing this. He, with a review from me, merge another tkinter doc patch a day or two ago. With him involved, it am going to review and check the existing suggestions. |
Sorry, something went wrong.
|
|
||
| .. method:: after_idle(func, *args) | ||
|
|
||
| Call FUNC once if the Tcl main loop has no event to |
There was a problem hiding this comment.
| Call FUNC once if the Tcl main loop has no event to | |
| Call *func* the next time the Tcl main loop has no event to |
Sorry, something went wrong.
| Cancel scheduling of function identified with ID. | ||
|
|
||
| Identifier returned by :meth:`~Tk.after` or :meth:`~Tk.after_idle` must be | ||
| given as first parameter. |
There was a problem hiding this comment.
| given as first parameter. |
This line is merged into the previous line by my previous suggestion.
Sorry, something went wrong.
|
|
||
| Cancel scheduling of function identified with ID. | ||
|
|
||
| Identifier returned by :meth:`~Tk.after` or :meth:`~Tk.after_idle` must be |
There was a problem hiding this comment.
| Identifier returned by :meth:`~Tk.after` or :meth:`~Tk.after_idle` must be | |
| This is the identifier returned by :meth:`~Tk.after` or :meth:`~Tk.after_idle`. |
Sorry, something went wrong.
| Retrieve data from the clipboard on window's display. | ||
|
|
||
| The window keyword defaults to the root window of the Tkinter | ||
| application. | ||
|
|
||
| The type keyword specifies the form in which the data is |
There was a problem hiding this comment.
Note: at least on Windows, there is only one clipboard, even when there are multiple screens.
| Retrieve data from the clipboard on window's display. | |
| The window keyword defaults to the root window of the Tkinter | |
| application. | |
| The type keyword specifies the form in which the data is | |
| Return data from the clipboard. | |
| The *window* keyword defaults to the root window of the Tkinter | |
| application. The *type* keyword specifies the form in which the data is |
Sorry, something went wrong.
|
|
||
| .. method:: clipboard_clear(**kw) | ||
|
|
||
| Clear the data in the Tk clipboard. |
There was a problem hiding this comment.
I think "Tk clipboard" should be explained.
Sorry, something went wrong.
|
|
||
| .. method:: grab_current() | ||
|
|
||
| Return widget which has currently the grab in this application |
There was a problem hiding this comment.
| Return widget which has currently the grab in this application | |
| Return the widget that currently has the grab in this application |
Sorry, something went wrong.
|
|
||
| .. method:: selection_own_get(**kw) | ||
|
|
||
| Return owner of X selection. |
There was a problem hiding this comment.
| Return owner of X selection. | |
| Return the owner of the X selection. |
Sorry, something went wrong.
|
|
||
| .. method:: winfo_geometry() | ||
|
|
||
| Return geometry string for this widget in the form "widthxheight+X+Y". |
There was a problem hiding this comment.
| Return geometry string for this widget in the form "widthxheight+X+Y". | |
| Return the geometry string for this widget in the form "widthxheight+X+Y". |
Sorry, something went wrong.
|
|
||
| .. method:: winfo_width() | ||
|
|
||
| Return width of this widget. |
There was a problem hiding this comment.
| Return width of this widget. | |
| Return the width of this widget. |
Sorry, something went wrong.
|
|
||
| .. method:: winfo_id() | ||
|
|
||
| Return identifier ID for this widget. |
There was a problem hiding this comment.
Return the identifier? Return an identifier? Omit 'ID'?
Sorry, something went wrong.
| Return the number of pixels of the height of the screen of this widget | ||
| in pixel. |
There was a problem hiding this comment.
| Return the number of pixels of the height of the screen of this widget | |
| in pixel. | |
| Return the height of the screen of this widget in pixels. |
Sorry, something went wrong.
| Return the number of pixels of the width of the screen of | ||
| this widget in pixel. |
There was a problem hiding this comment.
| Return the number of pixels of the width of the screen of | |
| this widget in pixel. | |
| Return the width of the screen of this widget in pixels. |
Sorry, something went wrong.
| ButtonPress, Button, Expose, Motion, ButtonRelease | ||
| FocusIn, MouseWheel, Circulate, FocusOut, Property, | ||
| Colormap, Gravity Reparent, Configure, KeyPress, Key, | ||
| Unmap, Deactivate, KeyRelease Visibility, Destroy, |
There was a problem hiding this comment.
| ButtonPress, Button, Expose, Motion, ButtonRelease | |
| FocusIn, MouseWheel, Circulate, FocusOut, Property, | |
| Colormap, Gravity Reparent, Configure, KeyPress, Key, | |
| Unmap, Deactivate, KeyRelease Visibility, Destroy, | |
| ButtonPress, Button, Expose, Motion, ButtonRelease, | |
| FocusIn, MouseWheel, Circulate, FocusOut, Property, | |
| Colormap, Gravity, Reparent, Configure, KeyPress, Key, | |
| Unmap, Deactivate, KeyRelease, Visibility, Destroy, |
Sorry, something went wrong.
| Store VALUE in WM_COMMAND property. It is the command | ||
| which shall be used to invoke the application. Return current | ||
| command if VALUE is None. |
There was a problem hiding this comment.
| Store VALUE in WM_COMMAND property. It is the command | |
| which shall be used to invoke the application. Return current | |
| command if VALUE is None. | |
| Deiconify this widget. If it was never mapped it will not be mapped. | |
| On Windows it will raise this widget and give it the focus. |
Pasted.
Sorry, something went wrong.
| Set the name of the icon for this widget. Return the name if | ||
| None is given. | ||
|
|
||
| .. method:: iconphoto(defualt=False, *args) |
There was a problem hiding this comment.
| .. method:: iconphoto(defualt=False, *args) | |
| .. method:: iconphoto(default=False, *args) |
The misspelling is NOT in the signature.
Sorry, something went wrong.
|
|
||
| Descriptions taken from source code docstrings. No newline at end of file |
There was a problem hiding this comment.
Not needed for blurb, as oposed to checkin message.
| Descriptions taken from source code docstrings. |
Sorry, something went wrong.
|
In this review, I implemented nearly all of vadmium's suggestions. Some appear attached to his suggestions, others appear separately because he only attached comments to 1 line and not necessarily the one that needed change. It would probably be easier to review my suggestions on the 'file' page where they should be in order. Serhiy, I left suggestions for you to review and merge (click button) and resolve (click other button if needed). Some of these changes should be propagated back to the docstrings. You can decide which. Once these are all resolved, I can look through again. |
Sorry, something went wrong.
|
I currently work on alternative PR. While this PR copies from docstrings to the documentation, I copy directly from Tk docs. Docstrings are less detailed and may be outdated, as they were based on old Tk docs. |
Sorry, something went wrong.
Sorry, I saw the merge to sync with the main branch and assumed it was some sort of bulk change, so I had closed this MR since it is outdated. I can apply the changes suggested to let this move along, though it sounds like Serhiy is working on a more updated version that more closely matches the Tk docs. |
Sorry, something went wrong.
|
Yes, leave this alone for now. Thanks for the effort. |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Added most (not all) of the methods for the Tk class.
This also includes parent class methods from the WM and Misc classes in the same module.
Descriptions taken from source code docstrings.