[pygtk] gio.Mount.get_default_location()
Leon Bogaert
leon at tim-online.nl
Mon May 30 04:49:44 WST 2011
Could somebody try this code on their machine? http://pastebin.com/Q3UqQrND
________________________________________
From: Leon Bogaert
Sent: Sunday, May 29, 2011 20:14
To: Avi Levy
Cc: pygtk at daa.com.au
Subject: RE: [pygtk] gio.Mount.get_default_location()
Sorry, the type is not in the actual code.
So even without the type the error persists :) Even if I replace the callback by 'None' the error occurs.
Regards,
Leon
________________________________________
From: Avi Levy [avi142 at gmail.com]
Sent: Sunday, May 29, 2011 20:03
To: Leon Bogaert
Cc: pygtk at daa.com.au
Subject: Re: [pygtk] gio.Mount.get_default_location()
In the code you typed, there is a typo right?
You pass "callbackz" to mount_enclosing_volume
but you defined only the function "callback"
Does the issue persist after fixing this?
On Sun, May 29, 2011 at 10:43 AM, Leon Bogaert <leon at tim-online.nl<mailto:leon at tim-online.nl>> wrote:
I'm migrating my gio code from the static binding to gi.
But I have a problem with a callback.
For example:
def callback():
pass
location = Gio.file_new_for_uri('ssh://kees@concepts')
mo = Gtk.MountOperation()
location.mount_enclosing_volume(mo, callbackz)
When you run that I get:
Traceback (most recent call last):
File "test_gi.py", line 82, in <module>
location.mount_enclosing_volume(mo, 'callbackz')
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 44, in function
return info.invoke(*args)
TypeError: Error invoking Gio.mount_enclosing_volume: Unexpected value for argument 'callback'
The docs say I also can provide 'None' (http://developer.gnome.org/pygobject/stable/class-giofile.html#method-giofile--mount-enclosing-volume) but that gives the same error.
Is this something not yet implemented or am I doing something wrong?
Regards,
Leon
_______________________________________________
pygtk mailing list pygtk at daa.com.au<mailto:pygtk at daa.com.au>
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
More information about the pygtk
mailing list