Multiple bonobo widgets, advice required.



Hi

I've hit a problem with my bonobo application. I have a conatainer which
starts a component using bonobo_widget_new_control, the drawable produced
by the component is added to a scrolled window in the container. This
works fine apart from some strange behaviour when the drawable resizes
itself and the scrolled window resets its scrollbars resulting in the
drawable being cleared, but that's not my main problem.

I want to be able to have another drawable crontrolled from the same
component appear in another scrolled window in my container app, this is
what I've tried so far:

the component creates a drawable and uses it to create a control

control = bonobo_control_new(GTK_WIDGET(Drawable));

I convert the control to corba_objref and then to an IOR string

CORBA_char *ior = CORBA_ORB_object_to_string(orb,
	bonobo_object_corba_objref(BONOBO_OBJECT (control)), &ev);

I pass the IOR string to the container via a property set on my original
drawable created via bonobo_widget_new_control. In the container I've tried
doing the following

control = CORBA_ORB_string_to_object(orb, ior, &ev);
wd = bonobo_widget_new_control_from_objref(control, uic);
gtk_scrolled_window_add_with_viewport(GTK_WIDGET(sw), wd);


Although this runs without errors, the drawable in the container remains
parentless and doesn't have get a window to draw on. I've tried using the
same Bonobo_UIContainer used for the first drawable, and also creating a
new one - the result is the same.

I need to have the scrolled windows controlled from the container application
and therefore don't want to add the 2 drawables as a single multi-window
widget.


Is what I'm trying to do valid or am I doing something wrong?

Any help or advice much appreciated.

Thanks
Franco





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