Re: org.gnome.Application DBus Interface



On Thu, 2007-08-16 at 14:33 +0200, Xavier Bestel wrote:
> 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.
> 
well, that's not what I mean. We are talking about providing an easy way
for apps to call actions on other apps, right? For complex interfaces,
you need a proper DBus interface, but what if my app just has a
DoWhatever action? Should I create a new DBus interface just for that?
Should apps willing to use my DoWhatever action get the interface's
introspection files, generate bindings for that, and use a new, specific
object just for calling that method? And what about apps that use lots
of apps' interfaces (Atomato, for instance, which is what I would like
this for), should those use dozens of introspection files, generate
dozens of bindings just for using 1 or 2 methods on each app?

If we go that way, nobody would want to use my DoWhatever action,
because we would be making a very simple task ("call an action on this
app") a PITA for the developer.
-- 
Rodrigo Moya <rodrigo gnome-db org>




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