Re: having one bonobo control instance per process



Hi Jason,

On Sun, 2002-05-12 at 16:04, Jason Hildebrand wrote:
> I'm working on a new version of gnome-vim (vim as a bonobo control), and
> trying to work out a less hackish architecture than the first attempts,
> which embedded vim instances running inside zvt widgets.

	Great :-) sounds good - I hope you're targetting Gnome 2.0.

> I'd like to start adding bonobo support directly in the vim source, so
> that it can run as a bonobo control. 

	Sounds best; or at least in something separate that links to all the
gutsy bits.

> One conclusion I have made so far, after taking a look at the vim
> source, is that due to all the global data structures, it would be nigh
> impossible to have more than one component per process.  Thus each
> instance of gnome-vim must run in its own process.  

	Ok, fine.

> Conceptually this seems straightforward, but I have not been able to
> find an example of a different project which does this.  All bonobo
> controls which I've seen have a factory component to produce the
> instances, and the factory runs in the same process as all of the
> instances.  

	Oh; yes, this could be marginally tricky I suppose.

> My problem is, how do I write a factory which spawns vim processes
> returns the object references to oaf?  The only thing I can think to do
> is to use a similar tack that oaf uses to bootstrap a factory component:
> the factory executable is expected to return its stringified IOR through
> a pipe to the oaf process.  

	Yes - for now I'm afraid that's about the best we can do. I plan to
fairly radically hack bonobo-activation-server around in the 2.1
timeframe, so we can add an attribute to help you do this automatically
- can you file a bug against bonobo-activation specifying what you want,
and a nice attribute name to tag what you want :-) then it'll be easier
to implement.

	The tragedy of bonobo-activation is that it tries to solve a problem
we're not really interested, and fails to do it at the expense of a load
of far more useful small features, and code clarity. I'm slowly
eviscerating it into something more simple, so that we can then make it
do what we need.

> I could use a similar tactic. I can implement
> Gnome_Vim_Factory_create_object by spawning a vim process, get its IOR
> through a pipe, and pass that back to oaf.  From looking through the
> bonobo source, I think that I wouldn't be able to use the
> bonobo_generic_factory in this case; I'd have to roll my own.
>
> Does this sould like I'm on the right track?  Or is there a simpler way
> to achieve what I want?  

	Sadly it sounds like you're on the right track.

> I'm still learning a lot of bonobo/corba/oaf as I go, but as no existing
> tutorial or example does what I'm trying to do, it seems like I'm either
> breaking new ground or heading the wrong way.  

	You're mostly breaking new ground I think, you've got an impressive
grasp of what needs doing though :-)

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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