All,<br><br>In addition to updating this Activity I have modified the web version of "Make Your Own Sugar Activities" in the chapter "Fun With The Journal" as follows:<br><h2>NOT Adding A Journal Entry</h2>


  <p><em>Note: the technique described in this section is broken in some
 versions of Sugar.  If you use this technique your Activity will not 
work on those versions.  The technique is documented and <strong>should</strong> be supported in every version of Sugar, but there is a certain risk in using it.</em></p>

  <p><em>In addition to the risk, there is a school of thought that 
Activities should always leave behind a Journal entry.  The idea is that
 the Journal is not just a place for data, but is the equivalent of a 
personal journal that a child might keep about his school work.  If you 
subscribe to that idea then every thing the child does should have a 
Journal entry so the child can enter notes about it.<br></em></p>

  <p>Sugar Activities by default create a Journal entry using the <em>write_file()</em> method.  There will be Activities that don't need to do this.  For instance, <strong>Get Internet Archive Books</strong> downloads e-books to the Journal, but has no need for a Journal entry of its own.  The same thing is true of <strong>Sugar Commander</strong>. 
 You might make a game that keeps track of high scores.  You could keep 
those scores in a Journal entry, but that would require players to 
resume the game from the Journal rather than just starting it up from 
the Activity Ring.  For that reason you might prefer to store the high 
scores in a file in the <strong>data</strong> directory rather than the Journal, and not leave a Journal entry behind at all.</p>

  <p>Sugar gives you a way to do that.  First you need to specify an extra argument in your Activity's <em>__init__()</em> method like this:</p>
  <pre>class SugarCommander(activity.Activity):
    def __init__(self, handle, create_jobject=True):
        "The entry point to the Activity"
        activity.Activity.__init__(self, handle, False)
</pre>

  <p>Second, you need to override the <em>close()</em> method like this:<br></p>
  <pre>    def close(self,  skip_save=False):
        "Override the close method so we don't try to
        create a Journal entry."
        activity.Activity.close(self,  True)
</pre>

  <p>That's all there is to it.</p><br>Also, previously I had said the Journal interface extended Activity, but now I point out that this used to be true but no longer is.<br><br>My plan for the book is to have the website have the most up to date and correct information, but leave the e-books and Lulu version alone.  The e-books mention the website being the best source of information.  If the differences between the website and the published books becomes significant I'll publish new editions of the books.<br>
<br>James Simmons<br><br><br><div class="gmail_quote">On Tue, Aug 9, 2011 at 2:33 PM, Sugar Labs Activities <span dir="ltr"><<a href="mailto:activities@sugarlabs.org">activities@sugarlabs.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Activity Homepage:<br>
<a href="http://activities.sugarlabs.org/addon/4291" target="_blank">http://activities.sugarlabs.org/addon/4291</a><br>
<br>
Sugar Platform:<br>
0.82 - 0.92<br>
<br>
Download Now:<br>
<a href="http://activities.sugarlabs.org/downloads/file/27506/sugar_commander-8.xo" target="_blank">http://activities.sugarlabs.org/downloads/file/27506/sugar_commander-8.xo</a><br>
<br>
Release notes:<br>
This version modifies Sugar Commander so it leaves behind a Journal entry of its own.  Some versions of Sugar break Activities that don't do this.  I have attempted to make the Journal entry useful by keeping a log of all the tasks done with the Activity and putting it in both the Description metadata and in the Journal entry file itself, which has a MIME type of text/plain so you can load the log into Write, attach it to emails, etc.  The log has entries for copying files to the Journal, deleting Journal entries, modifying Journal metadata, and resizing images in the Journal.<br>

<br>
<br>
Sugar Labs Activities<br>
<a href="http://activities.sugarlabs.org" target="_blank">http://activities.sugarlabs.org</a><br>
<br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
</blockquote></div><br>