[Sugar-devel] New Chapter in Make Your Own Sugar Activities needs review
James Simmons
nicestep at gmail.com
Wed Mar 31 14:40:34 EDT 2010
Bert,
I fixed the instance->data error. The MIME fix will go in later, when
I have a chance to try it out.
Thanks,
James Simmons
On Wed, Mar 31, 2010 at 11:41 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
> On 31.03.2010, at 17:54, James Simmons wrote:
>>
> Some more inaccuracies I didn't notice the last time:
>
> You write "For that reason you might prefer to store the high scores in a file in the instance directory". You mean the "data" directory here. The "instance" directory is not persistent, see
>
> http://wiki.sugarlabs.org/go/Development_Team/Low-level_Activity_API#Writable_Directories
>
> Also, for guessing the mime-type you do not use the same mechanism as Sugar usually does (which uses GnomeVFS, Python's default is based on the portable but less powerful "file" magic). So e.g. you do not guess the type for Etoys projects correctly ("*.pr"). The right way is:
>
> from sugar import mime
> file_mimetype = mime.get_for_file(filename)
>
> I hope that's all now ;)
>
> - Bert -
More information about the Sugar-devel
mailing list