[Sugar-devel] moving datastore projects via usb sticks?
sascha-ml-reply-to-2010-4 at silbe.org
Fri Dec 31 06:21:59 EST 2010
Excerpts from Erik Blankinship's message of Thu Dec 30 14:25:21 +0100 2010:
> In my video game, I am saving game state resources into a tar file, which is
> then saved to the journal / datastore.
> Later in the game, a child can use an object chooser to select one of these
> game states. "Under the hood" we check if the datastore object file_path
> ends with tar or gtar before we attempt to untar it and restore the game
I get the impression that you're trying to "port" an existing application
(game) to Sugar by looking for APIs that match those you use on other
platforms. This is NOT going to result in a good user experience.
I highly recommend you spend some time _using_ Sugar (as a user, not a
developer) and getting accustomed to the usual work flows first.
> However, when one of these datastore entries is copied to a usb stick, a few
> things happen which seem to make it impossible to re-open the copied files
> on another machine running sugar.
My message <1287313432-sup-4437 at twin.sascha.silbe.org>, written on
2010-10-17 13:54, subject "Re: How to copy something from the Journal to
a pendrive? FotoToon export?" and other messages of the same thread might
be of interest to you (I don't have a link to the archives handy because
I'm writing this mail offline).
> Next, when a child uses the object chooser to select this game state off of
> the usb stick, debug traces reveal that the datastore object file_path does
> *not* end in tar or gtar. (It is, instead, an apparent random gibberish
Yes, you should treat it as a "random gibberish" (i.e. opaque) string.
Everything else should be derived from the metadata (or the file
contents, as appropriate).
> Is there a suggested method or best practice for making and then opening
> datastore entries with lots of parts (hence, a tar file) which might migrate
> via usb sticks?
There are quite a few other activities (e.g. TurtleArt) doing this. You
might have a look at them (after reading the message mentioned above).
Pressing Alt+Shift+V (or Fn+Space on the XO, the "gear" key) from
within a running activity session will allow you to easily browse the
source of the activity (including activity.info, mimetypes.xml etc.).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 490 bytes
Desc: not available
More information about the Sugar-devel