Re: view not activated



On Fri, 29 Dec 2000, Michael Meeks wrote:

>
> Hi Arturo,

Hi!!

>
> On Fri, 29 Dec 2000, Arturo Tena wrote:
> > I've developed a _very_ simple embeddable ( it's just a label =) ).
>
> 	Oh dear. An Embeddable is so much more than just a widget.

I know, I know. =) I'm just showing step by step the construction of an
embeddable. And the first interface it must implement is Embeddable. Thank
you for the note, though.

> An embeddable does:
>
> 	* Zooming
> 	* Printing
> 	* Behaving as a slave as part of a compound document
>

And it will. And you can bet that I will be bothering you with more
questions about Printing. =)

> 	A label is best represented as a control. Really, if you can't see
> your embeddable being useful and well behaved inside a gnumeric
> spreadsheet please use the control interface instead of the embeddable
> one.
>
> 	Anyway; it's good that you are hacking on bonobo so don't get
> discouraged.
>
> > When adding it in sample-container (from bonobo CVS), all works ok.
> > But if I double-click on the view, it is not "activated" (I don't know
> > what is the right term here). The view it is not sorrounded by a grey
> > box.
>
> 	You need to acknowledge that you are happy to accept the state
> change given by a double click IIRC; see bonobo-hello anyway; I think
> bonobo-view.c (hello_bonobo_view_activate) is what you want. I would
> reccommend basing your embeddable on bonobo-hello.

Oh! I completely missed that. Thank you very much! I works!

>
> > Instead of creating new GTK+ classes for embeddable and view
> > interfaces (like bonobo/samples/compound-doc/bonobo-hello does), I'm
> > using bonobo_embeddable_new and bonobo_view_new functions. And my
> > embeddable doesn't implement any other interfaces than Unknown and
> > Embeddable.
>
> 	This is rather sub-optimal, in this case you have to connect to
> the signal I think, but it's a more ugly way of doing things. I would
> really reccommend copying bonobo-hello which does things by sub-classing
> and is generaly quite clean now.

I'm going to show this code to a non-GNOME programmer guy. So, I want it
the simplest thing on earth. =)

Now, help me understand, why is this sub-optimal and ugly?  Because the
connected activate signal callback would not be the default signal
handler?

<set-rude-mode>
And if this is ugly... why does bonobo_view_new exist anyway?
</set-rude-mode>

=)

>
> 	HTH,

A lot. Thank you very much!

>
> 		Michael.
>
>



	Saludos!
	Greetings!

-- 
Name:  Arturo Tena
email: arturo directmail org
ICQ:   63292893






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