|
Re: help with non-embedded Bonobo server: msg#00150gnome.gtk+.python
A Qui, 2003-08-21 às 07:09, Ben Liblit escreveu: > James Henstridge wrote: > > the Uploader object here is a Servant object, while the factory function > > is required to return a bonobo.Object instance. It is currently not > > possible to do this for custom interfaces in Python. > > :-( > > If that requirement is part of the bonobo GenericFactory interface, can > I instead create my own UploaderFactory interface that is declared to > return an Uploader object? If I do that, though, will I still be able > to use bonobo's activation infrastructure? Or is the activation > infrastructure fundamentally tied to GenericFactory and therefore to > bonobo.Object? bonobo-activation is *not* at all tied to GenericFactory. It is tied to the Bonobo::GenericFactory IDL interface. See $prefix/share/idl/bonobo-activation-2.0/Bonobo_GenericFactory.idl. See also libbonobo source to see how it works. It seems that a generic factory implementation should register itself first. See bonobo-generic-factory.c:bonobo_generic_factory_construct(): ret = bonobo_activation_active_server_register (act_iid, BONOBO_OBJREF (factory)); Later, the bonobo activation server will call the factory's createObject() method. You should be able to implement a simple factory in python this way. > > Taking a different approach, what are other examples of (non-custom) > interfaces for which GenericFactory does work? I know about > bonobo.Component, but I assumed that this provides widget embedding > support which I do not need. Is there some other bonobo.Object subclass > that would be a suitable superclass for my service? (Again, my service > has a standalone PyGTK GUI in the form of a notification area icon, but > is not intended for embedding within clients.) Perhaps you could register a bonobo.PropertyBag object. This property bag could have a property that would return your custom interface. Regards. -- Gustavo J. A. M. Carneiro <gjc@xxxxxxxxxxxxx> <gustavo@xxxxxxxxxxxxxxxxxxxxx> _______________________________________________ pygtk mailing list pygtk@xxxxxxxxxx http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: help with non-embedded Bonobo server: 00150, Ben Liblit |
|---|---|
| Next by Date: | Re: Using Accessibility interface from PyORBit?: 00150, Tessa Lau |
| Previous by Thread: | Re: help with non-embedded Bonobo serveri: 00150, Ben Liblit |
| Next by Thread: | fetching icon from gnome theme: 00150, Erik Grinaker |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |