[Sugar-devel] Stateless activties (was Re: Fw: #3013 UNSP: toolbar error)
James Simmons
nicestep at gmail.com
Thu Aug 4 10:23:34 EDT 2011
I am in favor of supporting stateless Activities. There are too many good
use cases for them to not support having them. 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). 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.
The parameter in the __init__() method looks like it has been there from the
beginning of Sugar.
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.
James Simmons
On Thu, Aug 4, 2011 at 1:07 AM, James Cameron <quozl at laptop.org> wrote:
> On Thu, Aug 04, 2011 at 10:27:09AM +0500, Sebastian Silva wrote:
> > I just tried Log activity, it does create a Journal entry by default.
>
> This has since changed. As I said, look at the Log activity source ...
> sorry I wasn't explicit enough ... in the git repository.
>
> Specifically,
> http://git.sugarlabs.org/log/mainline/blobs/master/logviewer.py#line329
> is where the activity instructs Sugar not to create a Journal entry by
> default.
>
> And,
> http://git.sugarlabs.org/log/mainline/blobs/master/logviewer.py#line511
> is where a Journal entry is created as a result of user action.
>
> Sorry nobody has released a new version of Log yet. That might be a
> good idea.
>
> > So I wonder, is the workaround described in the book supported?
>
> Well, I don't know about supported, but it clearly doesn't work. Let's
> find out why and get it fixed, or changed. That is, in Sugar or the
> book. Books are code too, but they are slightly harder to change.
>
> --
> James Cameron
> http://quozl.linux.org.au/
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110804/1b77b1bf/attachment-0001.html>
More information about the Sugar-devel
mailing list