Re: GNOME 2.8: Scripting



On 29/03/04 21:57, Rodrigo Moya wrote:

On Mon, 2004-03-29 at 21:05 +0800, James Henstridge wrote:
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.
I know you can do things like this (after all, that's how GObject and the CORBA C mapping are done), but it does mean that you end up providing a procedural interface even if the target scripting language can support something better. And for the majority of non-trivial applications, the model you want to manipulate is object oriented.


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, ...?
For in-process scripting, GObject with appropriate introspection info would probably work pretty well. For out-of-process use, custom CORBA interfaces work pretty well, although I realise that they are a pain to implement in C.

Without knowing what the Accessible::Document interface would look like, I can't say whether at-spi would be any better or worse. The current interfaces appear to only mirror the GUI (view) portion of an app, which is of limited use for scripting.

There are probably other options available too. My point is that telling people to use one interface for scripting small programs, and a completely different API for scripting their larger office programs seems a bit confusing.

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/





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