Re: Embedding components in under 100 lines (Was Re: Embeddinggnumeric...)




On Fri, 1 Sep 2000, Iain wrote:

> >    The document I mentioned above, in the section on CORBA and compound
> > documents, states:
> >
> >   "Gnumeric is also available to other applications as a Bonobo component.
> > (Bonobo is the compound document architecture of GNOME).  This enables
> > your application to embed Gnumeric into your application for editing, or
> > displaying information.  *One line of code would achieve all the magic you
> > need.*"  [Emphasis mine]
> >
> >    Can somebody clue me in on what this "One line of code" might be?
> > Because I certainly haven't been able to figure it out from reading the
> > mailing list archives, or the bonobo/samples codes (which imply that one
> > *thousand* lines of code is probably closer to the truth),
> 
> Well, 1 line is only true if you have your app bonoboised already.
> 10 lines is probably more of a reality if you don't.
> 
> Here's a short (80ish lines long) program that sticks any bonobo embeddable
> into a GtkWindow.
>
[Extremely helpful code example elided] 
> 
> Okay, so it lacks a few things (activation, UIHandlers) but these things are
> fairly
> simple to add.
> 
> iain
> 

   Many thanks for this information.  If I might, I'd like to ask for a
pointer or two.  Just as background, I've been programming for about 17
years, first in FORTRAN and BASIC, then starting in about 86 or 87, in C.
Some smatterings of C++, Perl, and a few other scripting languages, but
whenever I want to do anything serious, I use C.  Unfortunately, most of
my heavy programming in C has been in the fields of numerical analysis,
algorithm design, and more recently, some device drivers.  I'm actually
quite new to the field of interface design, and I'm cutting my teeth on
the subject using GTK+ and Gnome.  The whole event/callback paradigm is
quite new to me and has been giving me an *enormous* amount of trouble.
I'm learning, but slowly, and while working under some fairly important
deadlines.  I have a copy of Pennington's "GTK+/Gnome Application
Development," and it has been invaluable, but there are definitely some
holes in it (mainly due to the fact that these libraries are pretty much a
moving target, it seems).

   So, what it boils down to is that I'm trying to teach myself the entire
method of interactive application design by reading this book, reading a
lot of source code, and any online tutorials and documentation that I can
track down.  Things that are simple to someone who's been doing this sort
of programming for a while are not simple to me.  You mention "activation"
and "UIHandlers" in passing as something that is simple to add, but I
don't have your background and am not even really sure where to start.
Can you suggest any books, online tutorials, or other documentation that
would be a good place to start trying to figure this stuff out?  I'm sure
there are other newbies out here who could use the information just as
much as I.


thanks again,
Jim Wiggs






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