Hi,<br><br>Thank you for your advice. Everything works fine now.<br><br>Regards<br><br><br><div class="gmail_quote">On Sat, May 31, 2008 at 4:03 PM, Murray Cumming &lt;<a href="mailto:murrayc@murrayc.com">murrayc@murrayc.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Fri, 2008-05-30 at 14:19 +0800, Dinh Khac Thanh wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I wrote a simple program using gtkmm&#39;s DrawingArea widget. It turns<br>
&gt; out fine (no error) but does not show up in Xephys window. After<br>
&gt; searching Google I got this:<br>
</div>[snip]<br>
<div class="Ih2E3d">&gt; &gt; &gt; Yes, the version of gtkmm that is in the maemo repository uses some<br>
&gt;<br>
&gt; &gt; &gt; special optimizations. The most obvious change is that there are no<br>
&gt; &gt; &gt; default signal handlers, so you must connect a signal handler instead of<br>
&gt; &gt; &gt; just overriding the default one.<br>
&gt; which I think is my problem (I check on_expose_event and it is not<br>
&gt; called). But I couldn&#39;t find the solution from that link.<br>
&gt; Could anyone tell me how to solve this? Thnx in advance.<br>
<br>
</div>You just need to add this code in your constructor:<br>
<br>
#ifndef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED<br>
//Connect the signal handler if it isn&#39;t already a virtual method<br>
override:<br>
signal_expose_event().connect(sigc::mem_fun(*this,<br>
&amp;Clock::on_expose_event), false);<br>
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED<br>
<br>
I am adding that to the clock example in the gtkmm book (in the<br>
gtkmm-documentation module):<br>
<a href="http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-drawing-clock-example.html" target="_blank">http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-drawing-clock-example.html</a><br>
<div class="Ih2E3d"><br>
&gt; Btw, anyone has experiences on using Gnome Canvas in maemo? I am<br>
&gt; thinking of switching to Gnome Canvas since using Drawing Area/Gdk&#39;s<br>
&gt; Pixmap is a pain to me.<br>
<br>
</div>I recommend that you use goocanvas. libgnomecanvas is not really<br>
maintained now, and people generally avoid using it. goocanvamm exists,<br>
though I haven&#39;t yet used it on Maemo.<br>
<br>
<br>
Do try to use the gtkmm-list mailing list for questions about gtkmm. You<br>
were lucky that I saw your message on maemo-developers.<br>
<font color="#888888"><br>
--<br>
Murray Cumming<br>
<a href="mailto:murrayc@murrayc.com">murrayc@murrayc.com</a><br>
<a href="http://www.murrayc.com" target="_blank">www.murrayc.com</a><br>
<a href="http://www.openismus.com" target="_blank">www.openismus.com</a><br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Dinh Khac Thanh<br>Computer Engineering student<br>National University of Singapore