Project Page — Exercise the Main Functions

Loading templates, saving, modifying, installing XO Activity Bundles

  1. Load the “Hello World” activity into the playpen/work area by clicking on the first item in the Examples window (which displays “HelloWorld…ivity”), and then click on the <right arrow>.
  2. Create a copy of the program in the playpen by putting it on the “shelf”.  Click on the “shelf” button at the bottom of the “Installed Activities” window. Note that after clicking on the “shelf” button, the title changes to “PyDebug SHELF storage”. Click on the <left arrow> to make a copy of the “HelloWorld.activity” folder, and all of the files and folders underneath it.
  3. Create an XO install bundle, and copy it to the Journal by clicking on the <left arrow> that is next to the top window on the left side of the screen labeled “Journal”.
  4. Leave PyDebug by clicking on the stop sign at the top left of  any of the menu tabs. Open the Journal. Install the HelloWorld-1.XO bundle (on builds since build 802, clicking on the square HelloWorld icon is sufficient, older builds require clicking the right arrow, and then the frame icon).
  5. Go into Terminal, change to the Activities directory (cd A<tab>), issue the long list command “ll”. Note that “HelloWorld.activity” folder has been created. Restart the graphical display by holding three keys down at the same time (<alt><ctrl><erase>). Note that the square icon for HelloWorld is now displayed.
  6. Use Terminal to remove the HelloWorld.activity. (type “rm -rf Hello<tab>. The rest of “World.activity” should be completed for you. Hit <enter> to delete the HelloWorld.activity folder and all the files and folders inside.
  7. Restart the graphics (5 above). Your HelloWorld activity should be gone.
  8. Now let’s use PyDebug to modify HelloWorld. Click on the PyDebug Icon. The playpen should have the HelloWorld program just the way you left it. Chane to version to 2,  put 2 characters of your choosing into the field for the icon, and change the shape to “star”. Click “create icon”, click “write info”.
  9. Change the message displayed on the “HelloWorld” screen to your name. (click on Editor tab, find the program line which is defining the label, and change it — line 26)
  10. Test out your changes before you put a new XO bundle in the Journal by clicking on the “Activity” tab, and then clicking on the left-most icon at the top of the screen.
  11. If the screen shows your changes, go back to the project page, and click the left arrow next to the Journal, to create a new modified XO bundle.
  12. If you are working on an XO 1.0, the memory is limited, and you should leave PyDebug, when you want to use Terminal. (The 1.5 has enough memory so you can leave PyDebug running) — To run at the same time, use <alt><tab>,  the frame key (upper right on keyboard) or run the cursor into a corner.
  13. Load the new bundle “HelloWorld-2.XO” from the journal. Congratulations, You’ve created your first distributable program!
  14. If you have an early version of Sugar, (Activity icons along the bottom of the screen), skip to the next number. Let’s take a moment to examine the activity wheel, (the tooltip calls this “Favorites View”), and compare it with the Journal.  On the “Favorites View”, in the upper right, there is an icon made up of horizontal lines, (with tooltip of “List View”). If you click on this you will see a window that looks very similar to the Journal. your new HelloWorld activity, with it’s new version number (2), will be visible on this view.  This “Lisst View” has two  fields that the Journal does not.  The star on the left side of the “List View” is what makes an activity a favorite.  If an activity is not a favorite, it doesn’t show up on the wheel. Also, you can check the version number for an activity, which doesn’t show up on the wheel, and is not shown in the Journal.
  15. Make sure you know how to get to the Journal on your machine.  On earlier builds, you must always go through the wheel, to get to the journal. Later builds allow you to go through the frame.
  16. Go back into PyDebug and save off a copy of your newly modified program to the PyDebug SHELF.
  17. If you have a USB flash drive, or a SD (secure digital flash card), you can have a simplified version control system to recover your programs in case of hardware or software disasters.  To set this up, you need to create a folder named “pydebug” at the root of the device. Then whenever you save to the SHELF, the debugger will save a date and time stamped copy on the external device in the /media/<device name>/pydebug folder.
Advertisements

About George Hunt

Retired electrical engineer and programmer, enthusiastic about OLPC as a vehicle for gathering together volunteerism, mine and so many others', for helping education in developing countries.
Gallery | This entry was posted in Resources. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s