Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

For the Ubuntu App Developer Showdown I need to know some basics about quickly. One really important thing is to know how the Treeview-Binding works with CouchDB. I did the Tutorial1 (rickspencer3.com/quickly-getting-started.html) which is outdated but I got it working. Then I tried to go through Tutorial2 http://rickspencer3.com/quickly-dialogs.html where I am almost done. The only thing is that the binding does not work. The source is in the following Link hosted by me (via dropbox): https://dl.dropbox.com/u/5694459/super-text.tar.gz (Maybe someone has permission to add the code here in the question - because I think this is a very good tutorial -> after finishing you are able to to a lot of things with quickly)

You need to install CouchDB in addition to quickly to run this code. And you must fill the Database with data. Enter some text and go to "File -> Save" on MenuBar and enter a Name and click OK- this adds a new record (you can do this 3 times to have some data in the database) After that here comes my problem: Now my OpenDialog does not work! Go to "File => Open" on MenuBar the created data should be shown. But this does not work like in the tutorial.

I don't know if this is the right place to ask this question, but I don't see an other way for myself to ask. And if I want to create an App in this short time for the App Developer Showdown, I need to know how this works because my App will use also a Table which shows columns.

share|improve this question
    
I think there is a fault in OpenDialog.py in the function: "load_titles(self, db)". But it can be also a fault in the Glade-configuration in object "liststore1". –  Marian Lux Jun 21 '12 at 11:10
add comment

1 Answer

up vote 1 down vote accepted

I got it working now with a bit digging on http://www.pygtk.org/docs/pygtk/class-gtkliststore.html#method-gtkliststore--append! There were two faults in OpenDialog.py

1) in def load_titles: You must append the title and text-values to the liststore-Object with adding the following line:

store.append([title, text])

2) in def get_selection: To figure out the selected row, you have to return the title and text to the Main-Window (SuperTextWindow) by adding the following line in the else-branch:

return (title, text)

then the code works fine!

Note: It would be nice if someone can host the code on this page or delete the whole question. Because this entry makes no sense if the code is not hosted here. I host this code via Dropbox but I don't want to do this forever... If you want the new code from me with the two lines added, I can send it to you if requested.

share|improve this answer
    
I saw on the link for tutorial2, that the two lines are shown in the tutorial. The problem for me was, that I made a PDF-File to view it and this two lines were not in the PDF (lost in print-process). –  Marian Lux Jun 22 '12 at 6:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.