Re: deprecated interfaces; one more question



On Fri, 2002-12-13 at 09:43, Michael Meeks wrote:
> Hi Gustavo,
> 
> On Wed, 2002-12-11 at 15:51, Gustavo J. A. M. Carneiro wrote:
> >   Well, unfortunately my server is in Python, so I can't do that:
> > deriving from BonoboObject in python is not supported (yet, I hope). In
> > addition, since the C object is deprecated, the python maintainers
> > refuse to do a python wrapper for it. I'm stuck. :(
> 
> 	Python has to provide a way for you to implement CORBA interfaces - so
> just use that to implement the Unknown -> Persist -> PersistStream
> interface. Ultimately you're going to need to implement all the methods
> yourself.

  It's one thing to create a CORBA server object implementing the
Bonobo::PersistStream interface. It's another different thing to create
a BonoboObject class that implements the same interface. The former
cannot be agregated into an existing BonoboObject, since
bonobo_add_interface takes a BonoboObject as argument, not
Bonobo_Unknown. In python, right now, one can easily create arbitrary
CORBA servers, but not BonoboObject based servers. I'm hoping that will
change soon, since programming in python is much more fun than C :)
  In short, I can create a Bonobo::PersistStream interface, but I cannot
add it to my bonobo.Control 

> 
> >   On a related subject, how does one create a Bonobo::Stream object? I
> > have managed to create one for reading using monikers, but I am unable
> > to create one for writing. This would be used for saving a component to
> > a file using the Bonobo::PersistStream interface.
> 
> 	Well; I think the workaround for this was to get a Storage interface
> from the directory, and then use openStream with the 'CREATE' flag set
> on it.

  I'll try that, thanks!
  If it works, I will try to document it! ;)

> 
> 	Of course - you can create in-memory streams etc. as well using the
> bonobo impl's.
> 
> 	HTH,
> 
> 		Michael.
-- 
Gustavo Joćo Alves Marques Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>




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