Re: My first component



Hi Oliver,

On Fri, 25 Aug 2000, Oliver White wrote:
> My idea is to reimplement much of the functionality of a 'Bloomberg
> Box'. However, I'm starting small, with a simple 'real time chart'
> component. Essentially it's a wiggly line generator. ;-)

	Excellent; this sounds fun.

> My starting point is writing the IDL file for it.

	Ok; this is not where I would start. Many, many components can be
implemented using the standard interfaces that Bonobo provides. It only
makes sense to add extra interfaces is the environment you plan to put
this component in requires additional communication with the component. So
I would not start by writing IDL or you will get scared :-)

> >From what I've been told (and it's been a bit tricky finding the right
> documentation), I'll need to inherit from the GNOME::Control interface.
> I have no idea what this interface looks like, or what header I need to
> include, or even what packages I'll need.

	Mostly you don't want to inherit from interfaces; this ties
unrelated interfaces together in a rather evil fashion. You want to create
a new interface that implements what you want do do and then aggregate it
with a related object.

> The interface will be along these lines:
> 
>     * dataStream : GNOME:Stream
>     * hSize : int
>     * vSize : int
>     * labelFont : font
>     * xUnits : int
>     * yUnits : int
> 
> And that's about it. I'll need to develop a simple protocol to send the
> timestamped data to the component, through the dataStream object. The
> rest is simply a matter of layout.

	To accept / provide streams you want to implement the
'PersistStream' interface. This is made very easy for you by the C wrapper
inside bonobo.

> So, could someone explain to me the steps I'll need to take to get from
> this to a finished component and a sample implementation?

	As someone mentioned the canonical referece for good practice is:

	bonobo/samples/compound-doc/	bonobo-hello and container.

	I hope this helps,

	Regards,

		Michael.

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






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