<html><body bgcolor="#FFFFFF"><div>On 4 Aug 2011, at 15:23, James Simmons <<a href="mailto:nicestep@gmail.com">nicestep@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>I am in favor of supporting stateless Activities.</div></blockquote><div><br></div><div>-1</div><div><br></div><div>Journal entries are not just old school save files. They are a log/journal of what the child has been doing, even if that didn't lead to explicit state storage. Activities that do not stave state often generate upstream bug reports and confusion, "I've run this activity before, why is the home activity icon still grey?" "Why is there no record of my previous uses of it." type thing.</div><br><blockquote type="cite"><div>There are too many good use cases for them to not support having them.</div></blockquote><div><br></div><div>I'm not convinced. I think it's just that some activity developers haven't though about this Sugar feature enough, or haven't implemented planned features/enhancements (my Moon activity is a good example, it does save state, but is very limited currently). I'm always disappointed when I find an activity not trying to store some useful state.</div><br><blockquote type="cite"><div>The Log Activity is a good example. There is no much point in having a Journal entry for Log. Old Journal entries do not point to old logs. (If they did there might be some point to having them, I suppose). </div></blockquote><div><br></div><div>Activity authors should be thinking about keeping useful state as part of their design process. It would be great if Log journal entries kept the log state so I could easily look back at previous errors after rebooting. Even as it is now I occasionally write some testing notes in the description field for later reference (often I copy/paste a traceback out of one of the actual log files so I can find it later), if the Log entries are now disabled in the next release I'll have to start copying and pasting into Write to keep a record :(</div><div><br></div><div>Regards,</div><div>--Gary</div><br><blockquote type="cite"><div>Games might do better to save state information in the data directory rather than create a Journal entry, if the state is nothing more than high scores.<br>
<br>The parameter in the __init__() method looks like it has been there from the beginning of Sugar.<br><br>I don't mind changing the book if that is what needs to be done, but I think the trick documented in the book is worth preserving.<br>
<br>James Simmons<br><br><br><div class="gmail_quote">On Thu, Aug 4, 2011 at 1:07 AM, James Cameron <span dir="ltr"><<a href="mailto:quozl@laptop.org"><a href="mailto:quozl@laptop.org">quozl@laptop.org</a></a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, Aug 04, 2011 at 10:27:09AM +0500, Sebastian Silva wrote:<br>
> I just tried Log activity, it does create a Journal entry by default.<br>
<br>
</div>This has since changed. As I said, look at the Log activity source ...<br>
sorry I wasn't explicit enough ... in the git repository.<br>
<br>
Specifically,<br>
<a href="http://git.sugarlabs.org/log/mainline/blobs/master/logviewer.py#line329" target="_blank"><a href="http://git.sugarlabs.org/log/mainline/blobs/master/logviewer.py#line329">http://git.sugarlabs.org/log/mainline/blobs/master/logviewer.py#line329</a></a><br>
is where the activity instructs Sugar not to create a Journal entry by<br>
default.<br>
<br>
And,<br>
<a href="http://git.sugarlabs.org/log/mainline/blobs/master/logviewer.py#line511" target="_blank"><a href="http://git.sugarlabs.org/log/mainline/blobs/master/logviewer.py#line511">http://git.sugarlabs.org/log/mainline/blobs/master/logviewer.py#line511</a></a><br>
is where a Journal entry is created as a result of user action.<br>
<br>
Sorry nobody has released a new version of Log yet. That might be a<br>
good idea.<br>
<div class="im"><br>
> So I wonder, is the workaround described in the book supported?<br>
<br>
</div>Well, I don't know about supported, but it clearly doesn't work. Let's<br>
find out why and get it fixed, or changed. That is, in Sugar or the<br>
book. Books are code too, but they are slightly harder to change.<br>
<font color="#888888"><br>
--<br>
James Cameron<br>
<a href="http://quozl.linux.org.au/" target="_blank"><a href="http://quozl.linux.org.au/">http://quozl.linux.org.au/</a></a><br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org"><a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a></a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank"><a href="http://lists.sugarlabs.org/listinfo/sugar-devel">http://lists.sugarlabs.org/listinfo/sugar-devel</a></a><br>
</font></blockquote></div><br>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Sugar-devel mailing list</span><br><span><a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a></span><br><span><a href="http://lists.sugarlabs.org/listinfo/sugar-devel">http://lists.sugarlabs.org/listinfo/sugar-devel</a></span><br></div></blockquote></body></html>