Talk:Activity tutorial: Difference between revisions

From OLPC
Jump to navigation Jump to search
Line 41: Line 41:


Hi. I followed the instructions, but when I click on the HelloWorld actibity in the dock, the icon is blank, and the donut just goes grey in one section, never finishes loading. I included the "touch NEWS" command as mentioned above. I'm on build 650. Thanks, --[[User:Tomhannen|Tomhannen]] 18:27, 27 December 2007 (EST)
Hi. I followed the instructions, but when I click on the HelloWorld actibity in the dock, the icon is blank, and the donut just goes grey in one section, never finishes loading. I included the "touch NEWS" command as mentioned above. I'm on build 650. Thanks, --[[User:Tomhannen|Tomhannen]] 18:27, 27 December 2007 (EST)

Some Experiences

1. I already have the sugar-jhbuild built successfully however, when I followed this tutorial to do the activity setup by: 'python setup.py dev', I get an error "ImportError: No module named sugar.activity". Any suggestions? Thanks!

Answer: Get it done by running this under the sugar shell by using './sugar-jhbuild shell'

2. No icon
Answer: Using '<iconfilename>' instede of '<iconfilename>.svg' In the info file.

3. Activity cannot start
Answer: Change the file permission by 'chmod' and 'chown' command

Revision as of 21:08, 9 January 2008

sugar-install-bundle

This script does not exist. Install instructions should exist for:

  • easy command-line install
  • file-by-file instructions from a root shell
  • install via the web browser

GTK and SDL

Not every app performs tolerably OK in Python. Some of us use C with GTK. Some of us use C with SDL. There should be "hello world" examples for these as well.

Critique

  • The word activity seems highly overloaded/overused; e.g. three different uses in "hello.activity/activity/activity.info". Is it too late to shorten this? Do we really need this much structure and repetition? Similar for the sugar package structure; there's a toplevel package sugar with a subpackage named activity which itself contains a module named activity (and I think that defines a class Activity :-). I'm worried that this is going to cause confusion and hard-to-debug bugs where in a particular context it's hard to guess what the name 'activity' refers to. --Guido van Rossum
  • As this page is under the "Getting Started" heading, perhaps somewhere....

1) ...it could address the questions of "What language are activities written in?" (or make it more clear that all activities are run by an interpreter built into Sugar?)

2) ...and either explicitly say "There is no compiling of source code to do, the equivalent is part of the "bundling" process", or tell the reader more about the compiling.

The "source code" "heart" of the HelloWorld example is easy enough to find in what already exists.

Image for Emulation Environment

  • Which image should we be using to performance the helloworld exercise. I tried the livecd_sdk image with vmware and it didn't work.

duplicate use of HelloWorldActivity

I speculate that HelloWorldActivity used twice, as both the name of the module and the name of the class within the module, confuses people. It confuses me, anyway. I'd like to change module name to 'main'. Any reasonable name, other than HelloWorldActivity, will work, because the file resides underneath the HelloWorld.activity subdirectory. Anybody object to this? RussNelson 18:08, 16 July 2007 (EDT)

Better yet, to make things really clear: thing1, thing2, thing3, etc. AlbertCahalan 20:46, 15 September 2007 (EDT)

updates as of build 538

Tim.millerdyck 19:31, 29 July 2007 (EDT)

Here are some changes I needed to make to get the example working with Build 538.

  • The setup.py code should have "MyActivityName" changed to "HelloWorldActivity" to work with the example activity
  • The provided HelloWorld-1.xo archive has an out-of-date setup.py file that does not have required bundlebuilder parameters. The file should be edited to reflect what is on the Wiki page with the above change.
  • bundlebuilder complains if a NEWS file is not present. "touch NEWS" in the top-level activity directory to avoid this

Can't get this to work

Hi. I followed the instructions, but when I click on the HelloWorld actibity in the dock, the icon is blank, and the donut just goes grey in one section, never finishes loading. I included the "touch NEWS" command as mentioned above. I'm on build 650. Thanks, --Tomhannen 18:27, 27 December 2007 (EST)