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.

I tried to open a dialog like David Planella describs here (and quickly help add): Open Custom Dialog Windows (PyGTK + Quickly)

But this don't works for me. I always get the same Error-Message if I open the creadted Dialog:

AttributeError: 'module' object has no attribute 'NewDialogNameDialog'

(Note: My Dialog-Name is replaced with "NewDialogNameDialog" to be more general.) I tried to test a tutorial for the Ubuntu app showdown to learn how to use quickly and python.

I can also add the whole source-code if you wish.

share|improve this question
    
This error appears when I try to open the dialog on runtime. The line wich causes the error is: "dialog = DialogNameDialog.NewDialogNameDialog()" (terminal-output) –  Marian Lux Jun 20 '12 at 13:32
add comment

1 Answer 1

up vote 2 down vote accepted

I believe there is a typo in his example. The class and the module should have the same name. So instead of:

DialogNameDialog.NewDialogNameDialog()

it should likely be:

DialogNameDialog.DialogNameDialog()

(i.e. drop the New)

If that doesn't work, I'd like to see both files if possible.

share|improve this answer
    
THX very much! If I use DialogNameDialog.DialogNameDialog() it works! That is very confusing: in all the tutorials there is "New" before the Dialog-Name - also in the help of quickly.... –  Marian Lux Jun 20 '12 at 14:08
    
Fixed the code in the answer mentioned, thanks! –  David Planella Jun 20 '12 at 14:14
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.