Re: GNOME 2.8: Scripting



On Mon, 2004-03-29 at 21:05 +0800, James Henstridge wrote:

> On 29/03/04 17:59, Rodrigo Moya wrote:
> 
> >Hi
> >
> >One nice thing to have for GNOME 2.8 could be scripting of applications.
> >For this, we need a standard and easy way for applications to register
> >methods to be called from scripts and have those methods called.
> >
> >So, I've been thinking this weekend (over some beers, so I apologize in
> >advance if some things don't make sense :-) about this, and this is:
> >
> >* add signals to GnomeProgram like "getMethodList" and "runMethod", so
> >that apps can implement them and thus add support for scripting. I know
> >some people want to not add new features to libgnome* so that they can
> >be obsolete in a future. If so, I guess we could then have a
> >FooScripting (or whatever) class that implements this. The question is,
> >where?
> >
> >* as for the internal implementation, the obvious choice, at least to
> >me, seems to be BonoboApplication, which already has support for the 2
> >methods mentioned above. If we were to use BonoboApplication, we could
> >just avoid the step above, and so have applications that want to add
> >scripting support use BonoboApplication directly.
> >Other implementation choices are using d-bus.
> >
> >That's all I've thought, since I drunk too many beers, but I wanted to
> >share it so that some discussion could go on. So, any comments?
> >  
> >
> The main problem with the interface you list above is that it is 
> extremely limited.  The BonoboApplication interface seems to only 
> provide a collection of functions you can invoke on the application.
> 
right, but those functions can contain any kind of arguments / return
any kind of type (any CORBA type), which means you can include
context-specific arguments to make, for instance, different calls
associated with a given object.

> This isn't really going to be sufficient for larger applications where 
> you would probably want to expose multiple objects (eg. gnumeric might 
> provide operations you can invoke on each sheet and/or workbook you have 
> open, and maybe other operations you can invoke on cells or ranges).
> 
> Rather than having a toy scripting interface for simple apps and a 
> different one for serious apps, a single API would be preferable.
> 
what else do you propose then? Extend BonoboApplication, use
at-spi, ...?

cheers




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