From: Lluís <xscript@gmx.net>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: emacs-devel@gnu.org
Subject: Re: [dbus] type errors
Date: Mon, 03 Dec 2012 16:18:05 -0500 [thread overview]
Message-ID: <87vcciygvm.fsf@fimbulvetr.bsc.es> (raw)
In-Reply-To: 87pq2rhstu.fsf@gmx.de
Michael Albinus writes:
> Lluís <xscript@gmx.net> 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"):
#v+
(dbus-register-method :session
"org.gnome.Shell.CalendarServer"
"/org/gnome/Shell/CalendarServer"
"org.gnome.Shell.CalendarServer"
"GetEvents"
'ogc:--dbus-get-events)
#v-
>> 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:
#v+
Debugger entered--Lisp error: (wrong-type-argument D-Bus nil)
dbus-message-internal(2 :session ":1.15" 18386 ("" "Test" "" nil 63490176000 63490176001))
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))
#v-
And here's a test handler:
#v+
(defun ogc:--dbus-get-events (since until force-reload)
'(("" "Test" "" nil 63490176000 63490176001)))
#v-
>> 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
emacs-snapshot).
Lluis
--
"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
Tollbooth
next prev parent reply other threads:[~2012-12-03 21:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-03 17:59 [dbus] type errors Lluís
2012-12-03 18:51 ` Michael Albinus
2012-12-03 21:18 ` Lluís [this message]
2012-12-03 21:38 ` Michael Albinus
2012-12-04 11:21 ` Michael Albinus
2012-12-04 13:09 ` Broken build with --with-x-toolkit=no? Dmitry Antipov
2012-12-04 17:47 ` Eli Zaretskii
2012-12-04 20:43 ` Paul Eggert
2012-12-04 21:41 ` [dbus] type errors Lluís
2012-12-05 7:25 ` Michael Albinus
2012-12-05 11:55 ` Lluís
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vcciygvm.fsf@fimbulvetr.bsc.es \
--to=xscript@gmx.net \
--cc=emacs-devel@gnu.org \
--cc=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).