Problem with property multivalue

Thomas Themel thomas at themel.com
Fri Jun 25 01:17:44 PDT 2010


Hi,
Excerpts from stefano ligabue's message of Thu Jun 24 10:02:08 +0200 2010:
> Try the same operation with 'geometry' property that accept a parameter 
> '(iiii)' and receive the exception
> org.freedesktop.DBus.Error.InvalidArgs
> maybe because i don't know how format the correct parameter.
> The same response i have if use as parameter the answer of the same Get 
> operation:
> theInterface.Set('com.trolltech.Qt.QWidget', 'geometry', 
> theInterface.Get('com.trolltech.Qt.QWidget', 'geometry'))

I suspect that your problems are caused by the Variant wrapping in the properties
interface. Here's what works for me:

  bus = dbus.SessionBus()
  remote_object = bus.get_object("org.kde.konqueror-6730",
                                 "/konqueror/MainWindow_1")

  iface = dbus.Interface(remote_object, "org.freedesktop.DBus.Properties")
  iface.Set('com.trolltech.Qt.QWidget', 'geometry',
            dbus.Array([200,200,200,200], variant_level=1))
 
No idea why the Set(..., Get()) wouldn't work, probably the variant_level isn't
preserved as one would naïvely expect?

ciao,
-- 
[*Thomas  Themel*] Dir ist offenbar nicht bekannt, daß Lisp eine
[extended contact] Spezifikationssprache für Assemblercodierer ist.
[info provided in]      - Lutz Donnerhacke in dasr
[*message header*]


More information about the dbus mailing list