[Top][All Lists]

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

Re: [dbus] type errors

From: Lluís
Subject: Re: [dbus] type errors
Date: Mon, 03 Dec 2012 16:18:05 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Michael Albinus writes:

> Lluís <address@hidden> writes:
>> Hi there,

> Hi,

>> I've been trying to register a dbus method which is supposed to return a 
>> list of
>> elements with the following dbus signature: sssbxxa{sv} (method "GetEvents" 
>> in
>> "org.gnome.Shell.CalendarServer").

> You mean you wrote an own handler which reacts on
> "org.gnome.Shell.CalendarServer.GetEvents"?

I'm not sure about the nomenclature. Here's what I did (gets called when
clicking on the calendar "widget"):

(dbus-register-method :session

>> When returning the results, a backtrace pops up with the following error for
>> the "b" argument):
>> Debugger entered--Lisp error: (wrong-type-argument D-Bus 63490176000)
>> dbus-message-internal(2 :session ":1.15" 18130 ...)
>> apply(dbus-message-internal 2 :session ":1.15" 18130 (...))
>> dbus-method-return-internal(:session ":1.15" 18130 ...)
>> apply(dbus-method-return-internal :session ":1.15" 18130 (...))

> Boolean requests values `t' or `nil'. Not an integer.

Bad paste, sorry. This is the back trace:

Debugger entered--Lisp error: (wrong-type-argument D-Bus nil)
  dbus-message-internal(2 :session ":1.15" 18386 ("" "Test" "" nil 63490176000 
  apply(dbus-message-internal 2 :session ":1.15" 18386 ("" "Test" "" nil 
63490176000 63490176001))
  dbus-method-return-internal(:session ":1.15" 18386 ("" "Test" "" nil 
63490176000 63490176001))
  apply(dbus-method-return-internal :session ":1.15" 18386 ("" "Test" "" nil 
63490176000 63490176001))

And here's a test handler:

(defun ogc:--dbus-get-events (since until force-reload)
  '(("" "Test" "" nil 63490176000 63490176001)))

>> And for the "x" argument:
>> (wrong-type-argument D-Bus 63490176000)

> Per default, UINT32 is assumed. If you want to return INT64, you must
> specify the type for that value. Something like ... :int64 63490176000 ...

Adding a ":int64" also throws an error.

>> According to the docs in `dbus', these objects should be automatically
>> translated to their dbus counterparts (at least on `dbus-call-method').

> The signature of a method is not analyzed in dbus.el. That's why you must
> always specify the correct type, if you want to have something different
> but the default type.

> See (info "(dbus)Type Conversion")

Does not seem to exist in my currently installed package... (latest jd's


 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom

reply via email to

[Prev in Thread] Current Thread [Next in Thread]