Re: org.gnome.Application DBus Interface
- From: Xavier Bestel <xavier bestel free fr>
- To: Rodrigo Moya <rodrigo gnome-db org>
- Cc: desktop-devel-list gnome org
- Subject: Re: org.gnome.Application DBus Interface
- Date: Thu, 16 Aug 2007 14:33:50 +0200
On Thu, 2007-08-16 at 14:32 +0200, Rodrigo Moya wrote:
> > It's like having:
> > set_size
> > get_size
> > set_text
> > get_text
> > set_whatever
> > get_whatever
> > ...
> >
> > VS
> >
> > set_prop
> > get_prop
> >
> > You can do your life easier with the _prop combo, like:
> > set_prop(prop_var, prop_val)
> >
> > In my humble understanding, that's easier to code and understand
> than:
> > set_$(prop_var)(prop_val)
> >
> > I would say go go InvokeAction.
> >
> cool, I'm not alone :-)
The problem with that is you're one more step away from the canonical
"object.property = value".
If you're adding an indirection level to the DBus mechanism with
InvokeAction(), then why not adding one more level and call
org.gnome.Application.InvokeAction("CallFunction", "OpenDocument", "file:///mydoc.txt") ?
IMHO the simplest and cleanest, the better.
> Although I'm thinking that we might need also a ListActions method, to
> retrieve the list of actions supported by the application.
That means you'll add another mechanism for introspection (that's what
your "ListAction" will derive into, after others will notice you'll need
to add parameters types and return types maybe).
Basically you're nearly implementing yet another object system into
DBus.
Xav
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]