Re: scripting with bonobo



> interface EmbeddableLanguage {
>     void initialize ( in Host host );
>     void run ( in string script );
> };
> 
> interface Host {
>     void on_error  ( in Error error );
> };

Yes, this is exactly the direction I was hoping we could move to.  We
would like to have some sugar to integrate this into the GNOME
environment.


> Now, the interesting thing is of course how to get application
> specific stuff in your scripting environment, e.g. your 'Sheet'-object.
> To do that, we can add another method to EmbeddableLanguage:
> 
> 	  void add_object ( in Unknown unk, in string known_as );

You really do not need to do this, as you would be able to query
objects and load interface definitions from either the IR or the IDL
file.

So the top level object you pass to "initialize" (your Host) would
basically implement your toplevel object, and from there you could
walk the tree of objects.  Something like:

	workbook = host.query_interface ("IDL:Gnumeric/Workbook:1.0");
	sheet = workbook.get_sheet (0);
	

> So, do any of you think this is useful for application scripting in the
> Bonobo era? If so, I could write down some more complete IDL
> interfaces.

Please, do so.  They must become part of Bonobo/idl.

Looking at what Microsoft has in this area could teach us a few tricks
as well.

Miguel.




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