Re: GGV 1.1.96



Sergey,

On Thu, 2002-08-01 at 21:22, Sergey V. Udaltsov wrote:
> :) The bad thing is that it does not work even with minimal code:

	This is really an exercise in basic programming; the code you post is
no-where, approaching minimal; minimal is:

	a = bonobo_widget_new_control (fooMoniker, CORBA_OBJECT_NIL);
	gtk_container_add (foo, a);
	gtk_widget_show_all (foo);

	Then add lines of code in one by one ... really;

>     BonoboObject obj = ( bonobo_widget_get_server( newChild ) )->parent;

	Why are you copying the contents of that BonoboObject to your local
stack ? how is that going to help anyone ? how will it manage to store
references correctly on the BonoboWidget's object reference ?

>     Bonobo_Zoomable zoomable = bonobo_object_query_interface( &obj,
> "IDL:Bonobo/Zoomable:1.0" );

	What's with the '&obj' ? getting a pointer to your copy of this entire
object [ umpteen bytes ] on the stack;

>     Bonobo_Control control   = bonobo_object_query_interface( &obj,
> "IDL:Bonobo/Control:1.0" );
>
> Is there anything I can remove from here? There are no more "ev" things
> here. I switched to bonobo_object_query_interface from
> Bonobo_Unknown_queryInterface - have I done it right?

	Kill that code too - you don't need it in there.

> OK. No environment - no checks:) Actually I hope in this case it's
> bonobo who checks and reports CORBA errors. Should it?

	It should.

	Regards,

		Michael.

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




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