Re: newbie: Basic Frustrations



Hi Richard,

On Tue, 5 Dec 2000, Richard Andrews wrote:
> I've been struggling for days to try and get a basic component working.
> I'm using GNOME 1.2 (helix preview 2).
  
        I'm sorry to hear that; please, please send questions to the list,
or me privately if you think you might be doing something really silly
:-) In this case I don't think you are really.

> I use goad_server_activate_with_repo_id() to get the factory object. OK.

        I would strongly suggest that you use oaf for activation, goad is
a deprecated, and stale technology. Quite possibly it needs considerable
effort to get it to work; I havn't used it in a while.

> What am I doing wrong?

        What I would do is copy one of the examples in bonobo for example
bonobo/samples/controls/bonobo-calculator-control.c would be a good
starting place to adapt. It's almost always easier to modify someone
else's code than write from scratch.

> What do I need to pass to create_object(), especially for the
> string_list? Can I pass NULL, or an empty CORBA_sequence_CORBA_string  
> with _length=0?

        If you use oaf you can do:
  
        bonobo_object_activate ("OAFIID:my-id:my-big-number", 0);
  
        And get an object created by the factory without worrying about
the innards of the corba activation setup. Then you'll need to get a CORBA
handle from the BonoboObjectClient:
  
        My_Interface corba_handle = bonobo_object_corba_objref (
                BONOBO_OBJECT (what_I_got_from_activate));
 
        My_Interface_method (corba_handle, arg1, arg2, ev);
 
> Where can I find info? The components documentation GNOME site is
> horrifically inadequate and the headers don't give any information.
 
        The best thing to do is to read the simple sample code provided in
bonobo, or read bonobo/doc/FAQ for info on oaf see oaf/doc
 
> Where can I find simple sample code? I've tried cvs.gnome.org but all
> the samples I found were for Bonobo not using the GOAD server.

        Why do you want to use the GOAD server ? it's possible that you
might have a valid reason for doing this, but it's unlikely. GOAD will be
totaly dead in Gnome 2.0 and as such your component would have a shorter
lifetime than it would with oaf.

> I've read the GNOME&CORBA "book". Please don't suggest an upgrade.

        :-) You should be able to do everything from the samples provided
without having a book. I've not read this one, but I'm sure the corba
sections will still be useful even if the goad information is out of date.

        Don't hesitate to ask any questions, there are more interesting  
problems further in to grapple with than this :-)
  
        Regards,

                Michael.

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





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