[sugar] Hello Journal World!

Morgan Collett morgan.collett
Thu Feb 28 13:29:59 EST 2008


Tom Hoffman wrote:
> I think what I need to actually get rolling with Sugar development is
> a Hello World for the journal.
> 
> I'd like to see a tutorial (or just code even) with a Sugar activity
> that just takes an entry into a plain text box.  And puts that text
> into the journal.  When I click on the journal entry I see the text in
> the text box again.  (But I shouldn't have a "save" button?  When do I
> save to the journal?)
> 
> Obviously existing activities do this kind of thing, but I didn't have
> much luck finding out how from digging around (before I gave up and
> figured I'd wait for more documentation).

Marco had an "edit activity" which did the minimal stuff for Journal
entries. Doesn't seem to be in git any more, but I still had the files.
See http://dev.laptop.org/~morgan/editactivity.py (I don't know if it's
out of date, haven't tried to run it but it looks fine.)

The "Keep" functionality should be automatically invoked when you stop
an activity, or even alt-tab or switch away from it.

I don't think this example had an explicit Keep button but that should
be easy to follow from another activity.

Morgan



More information about the Sugar-devel mailing list