On Mon, 2002-02-04 at 17:44, Dan Winship wrote:
> On Sun, 2002-02-03 at 18:06, Nicholas Piper wrote:
> > I'm looking for an example of how to access calendar/contacts/todo
> > details from a python (or perl) script. I know this has to be via
> > corba/bonobo, but apart from that I'm pretty lost.
> > 
> > I've had a look at the Evo .oaf files, but have little clue how to
> > continue. I've installed bonobo-python ready.
> 
> I'm not sure that anyone who understands the Evolution corba interfaces
> is also familiar with the Python/Perl corba bindings. :-}
> 
> The basic thing to understand is that most of the interfaces are
> asynchronous. The client has to create "listener" objects that listen
> for responses from the backend. So something like:
> 
>     factory = [Get the GNOME:Addressbook:BookFactory object from oaf]
>     listener = [Create your own GNOME:Addressbook:BookListener object]
>     factory.openBook ("file:/.../addressbook.db", listener);
> 
> Then your listener object's "notifyBookOpened" method will be called at
> some point and given a GNOME:Addressbook:Book object. And you can invoke
> the getVCard method on that, which will eventually cause your listener's
> notifyCardRequested method to be called with the card data.
> 

I have a question somewhat related to this, so I'm tagging along on the
thread...

how do I create and access a composer object through CORBA?

I can get the shell by the python script:

#!/usr/bin/env python

import bonobo
import Bonobo
from GNOME import Evolution

shell = bonobo.get_object("OAFIID:GNOME_Evolution_Shell",
                          "IDL:GNOME/Evolution/Shell:1.0")


and from there I can fire up a composer though the handleURI method in
the shell interface:

shell.handleURI("mailto:[EMAIL PROTECTED]";)

but handleURI returns void, so I don't get access to the composer
object, and so I cannot access it through the composer interface. How do
I actually _get_ a reference to a composer?

        /mailund

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to