[Sugar-devel] Journal Implementation Help

James Simmons nicestep at gmail.com
Tue Jun 15 18:24:23 EDT 2010


Bao,

Metadata *should* work just as well as saving the properties to the
Journal entry.  In practice it's a bit more complicated.  In Sugar .82
and below custom metadata does not persist across reboots.  This is
fixed now, but if you have any ambition to support .82 you need to
consider that.  .82 is the most widely used version on XO's in the
field.

Second, while writing metadata without writing out a file *should*
work in some versions of Sugar (.82, I think, maybe others) it causes
a "Keep" error.  So it if you aren't using the file part of the
Journal entry for anything else if might be a better place to store
your properties to work around these bugs in older versions of Sugar
that are still widely used.

Note that standard metadata, like Title, does persists across reboots
in all versions of Sugar.  I used this fact to work around the custom
metadata bug in .82 in my Read Etexts Activity.  I store the last page
number read at the tail end of the title.

James Simmons


> Date: Tue, 15 Jun 2010 12:37:32 -0400
> From: Quoc-Bao Vuong <vqbao at lv5.org>
> Subject: [Sugar-devel] Journal Implementation Help
> To: sugar-devel at lists.sugarlabs.org
> Message-ID:
>        <AANLkTikJOxpJGgFzZCV1XsORw7s8beRb2PwFB8xOJcg9 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
>    * What is the proper way to write the write_file() and read_file()
> methods for a sugar activity. I've seen two ways (using metadata and
> writing/reading into files), but I'm not sure what works best for this type
> of situation.
>


More information about the Sugar-devel mailing list