[sugar] Hello Journal World!

Tomeu Vizoso tomeu
Thu Feb 28 13:53:07 EST 2008


On Thu, Feb 28, 2008 at 7:14 PM, Tom Hoffman <tom.hoffman at gmail.com> 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?)

The activity should keep its state in the journal updated. Of course,
this can be very expensive, so right now the data is saved at close
and when another activity gets the focus. At some point we'll want to
save periodically, but activities will need to grow a way of telling
is their state is dirty (and probably how much dirty).

>  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).

This will get a you a very simple activity that does just that:

git-clone https://dev.laptop.org/~marco/edit-activity

Tomeu



More information about the Sugar-devel mailing list