Re: TypeError in GtkWindow



On 10/08/2015 06:45 PM, Stefan Salewski wrote:
On Thu, 2015-10-08 at 17:09 -0300, Germán Racca wrote:
--> 134         coor = Coor2MASS(self)

I do not use Python, but that line seems to make no sense. Self is class
TitleBar: but later you call resp = coor.run(). So I guess for coor you
want something like a dialog, so you have to create it.

Thanks for your comment Stefan. I removed "self", and I get this:

Traceback (most recent call last):
  File "./q2MASS.py", line 134, in on_button_coor_clicked
    coor = Coor2MASS()
TypeError: __init__() takes exactly 2 arguments (1 given)

About "coor.run()", I have followed the exact steps in the official PyGObject tutorial:

https://python-gtk-3-tutorial.readthedocs.org/en/latest/dialogs.html#custom-dialogs

Regards,
Germán.

--
Germán A. Racca
Fedora Package Maintainer
https://fedoraproject.org/wiki/User:Skytux


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]