Metadata preserved across reboots?

2008-02-28 Thread James Simmons
Tomeu,

As I've mentioned before, I'm working on an EText reading activity that uses 
metadata to save the current page number when the activity closes, kind of like 
a bookmark.  When the activity is resumed the saved page number would be shown. 
 This works just fine while the XO is turned on, but the page number metadata 
disappears when you reboot or turn the machine off and on.  I'm using the same 
code that the Read activity does for this purpose, and I notice that Read has 
exactly the same problem.  This is frustrating.  The journal entry shows a 
screenshot of the page I left off on, but I don't go back to that page on 
opening.

I have also noticed that if I open the document from a USB card or an SD card 
no metadata is saved at all.

I had been assuming that this was a bug in Sugar that would be fixed at some 
point.  Your text below makes it sound like this is an actual deliberate 
feature.  Am I understanding this correctly?

James Simmons

 I also went through a number of activity sources in git looking for
  examples, but I didn't find one that ONLY used metadata. They all seem
  to either not bother storing any UI state (so resuming or from new
  makes no difference), or they save actual files.


I think at some point activities like those realize that they have
some data that would be better saved in a file.

But the determining reason would be that metadata properties other
than the custom ones are not preserved across reboots :/



___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Metadata preserved across reboots?

2008-02-28 Thread Tomeu Vizoso
On Thu, Feb 28, 2008 at 8:02 PM, James Simmons
[EMAIL PROTECTED] wrote:
 Tomeu,

  As I've mentioned before, I'm working on an EText reading activity that uses 
 metadata to save the current page number when the activity closes, kind of 
 like a bookmark.  When the activity is resumed the saved page number would be 
 shown.  This works just fine while the XO is turned on, but the page number 
 metadata disappears when you reboot or turn the machine off and on.  I'm 
 using the same code that the Read activity does for this purpose, and I 
 notice that Read has exactly the same problem.  This is frustrating.  The 
 journal entry shows a screenshot of the page I left off on, but I don't go 
 back to that page on opening.

  I have also noticed that if I open the document from a USB card or an SD 
 card no metadata is saved at all.

When is metadata not saved? Or you mean the metadata is saved but not retrieved?

  I had been assuming that this was a bug in Sugar that would be fixed at some 
 point.  Your text below makes it sound like this is an actual deliberate 
 feature.  Am I understanding this correctly?

No, it's a big bug in the current implementation of the DataStore.
Could be fixed in the current implementation, but there have been
plans of rewriting it, so nobody has looked into this since a long
time ago.

See http://dev.laptop.org/ticket/4662 for more details.

   I also went through a number of activity sources in git looking for
examples, but I didn't find one that ONLY used metadata. They all seem
to either not bother storing any UI state (so resuming or from new
makes no difference), or they save actual files.


  I think at some point activities like those realize that they have
  some data that would be better saved in a file.

  But the determining reason would be that metadata properties other
  than the custom ones are not preserved across reboots :/
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Metadata preserved across reboots?

2008-02-28 Thread James Simmons
Tomeu,

When I use the Read activity to open a document stored in a USB drive or 
my SD card I notice that I do not return to the page I was on 
previously, even though I have not restarted the computer at all; I've 
just ended the Read activity, then immediately resumed it.  I also 
notice that I *never* get a screenshot from the previous use of any 
activity when I open the entry on a USB drive or SD card.  All of these 
things work correctly in the Journal proper, except of course when 
rebooting.  You keep the screenshot but lose the activity-specifc 
metadata like page number.

On the USB and SD, I don't know if the metadata is saved or not.  I 
suppose it could be saved and never retrieved.  In any case, it's nice 
to know this is a bug and not intentional.

James Simmons


Tomeu Vizoso wrote:

When is metadata not saved? Or you mean the metadata is saved but not 
retrieved?


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel