sebp / sebp/PyGObject-Tutorial
Feature Request: Additional Clarification on "Simple Example" in "introduction.txt"
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 392
- Fork
- 157
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I hope this isn't too pedantic as a request, but just reading section 2.1 of the guide from the top, the first statement claims, "This program will create an empty 200 x 200 pixel window."
A graphical representation of such a window is then included.
The page then provides a 9-line program by way of an example, in source code, then follows to "explain each line of the example."
However, nowhere on this page does the text return to the subject of "200 x 200 pixel" sizing. It seems reasonable for the initial declarative statement to explain what is about to happen, but there is nothing in the sample code which defines such a size and it is therefore implied that Python's "Gtk.Window()" method, or perhaps "win.show_all()", must somehow default to these dimensions unless explicitly told otherwise.
If you're going to have a "simple example", can I respectfully request/suggest that the explanatory text be expanded just enough to tell the reader where the window dimensions come from.
I appreciate that this might come across as pedantry, but syntax is critical in programming, so in the early stages of introducing a language or framework, I would suggest that all defaults and assumptions need to be discussed.
This is all the more relevant given the second example on the Introduction Page (the ubiquitous "Hello World" application with the "Click Here" button. Miraculously, the rendered window has changed size. Yet again, there is nothing in the code to suggest window size or why this might be different from the first example. The two examples imply that if you deploy a random, empty window, then it will default to a size of 200x200 pixels, but if you deploy a window that contains an object (your second example uses a button), then the window will automatically size itself to the dimensions of the rendered contents.
None of which is explained.
Even if you want to direct your reader to set this aside, please don't leave hanging threads at the start...
Thank you
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Mở introduction.txt và đọc mục 2.1 cùng với hai ví dụ về cửa sổ của mục này. Kiểm tra cách văn bản hiện mô tả cửa sổ 200 x 200 và cửa sổ Hello World có kích thước khác; tài liệu được hoàn tất khi giải thích hành vi định kích thước và các giá trị mặc định liên quan mà không để những ví dụ đó không được giải thích.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- documentation
- Loại issue
- Tài liệu
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100