Two small mistakes in the code samples in part 2 of the tutorial
Bug #1069077 reported by
Marten Gorodetsky
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Quickly |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
quickly --version
Quickly 12.08.1
Problem 1:
The line
def save_file(self, widget, data=None):
should be:
def on_mnu_
Problem 2:
The line
return rows[0]['Name']
should be:
return rows[0]['File']
I've attached a patch that fixes these two problems using bzr diff -p1 in the trunk of quickly. I've never done this before so I hope this was the right way to do it.
tags: | added: patch |
To post a comment you must log in.
I noticed three more mistakes on the same tutorial page. I attached a new patch that fixes all five problems.
The three new mistakes I noticed are:
1) When the text entry is removed, the reader isn't told to remove the code in the on_mnu_new_activate handler which sets the text of the text entry.
2) To set the title of the window, the tutorial suggests to use the self.set_text method which does not exist. It should be self.set_title instead.
3) To make the files in the Open dialog react to double clicks, the tutorial suggests to connect the select-cursor-row signal. This signal doesn't handle double clicks, the row-activated signal should be used instead.