[sugar] HelloWorld activity

dmv at certi.org.br dmv
Wed Jun 27 11:07:51 EDT 2007


I built sugar-jhbuild this monday, and following the 'Hello World'  
from the wiki (http://wiki.laptop.org/go/Sugar_Activity_Tutorial), but  
no "Hello World" button widget appeared, and HelloWorld.log showed the  
following error:

/home/dmv/sugar-jhbuild/build/share/activities/HelloWorld.activity/HelloWorldActivity.py:28: GtkWarning: Attempting to add a widget with type GtkButton to a SugarActivity, but as a GtkBin subclass a SugarActivity can only contain one widget at a time; it already contains a widget of type  
(full log at http://pastebin.be/3334)

So what I did was this:
In HelloWorldActivity.py, line 28, where it said:
<        self.add(self.button)

I replaced it with:
>        self._vbox.add(self.button)

It worked. A giant "Hello World" button filled all screen. But now..  
Is it the best way to do it? Should I update the wiki?

Note: There had been comments on HelloWorld not working:  


Diego Vieira

This message was sent using IMP, the Internet Messaging Program.

More information about the Sugar-devel mailing list