[Sugar-devel] Using Sugarizer as development environment for Sugar Web Activities
Lionel Laské
lionel at olpc-france.org
Sun Feb 16 04:52:05 EST 2014
>
>
> The whole environment thing is really messy at the moment and this is
> going to make it worst. Though I think it's more important to avoid forking
> too much then to find a clean way to do it right now.
>
> Okay. I'm going to work to a sugar-web version that could be the same for
Sugar and Sugarizer. I will send a pull request on this.
> The only aspect I'm worried about is if we can always provide a sync
> implementation of isStandalone/getMode()... changing from sync to async
> later would be messy. Though a sync implementation is possible in all the
> cases I can think about and it should simplify things a lot compared to
> async.
>
Today, I think there is no problem about this. We could do a sync version.
But you're right async is a problem in some case. For example, one
difficulty I've got when I work on Sugar Web Activities is to handle the
basic issue of detecting a new game vs a restart of an old game in the
Sugar Web Framework.
I'm using activity.getDatastoreObject().loadAsText(callback) but the
callback is called only if the loadAsText is returning an object. So I need
to consider that I'm in a new game and if the callback is called, set data
as it was in the old game.
A better implementation could may be call the callback when loadAsText
don't find and existing object.
Both my recent web activities (FoodChain and Abecedarium) has the same
issue.
Lionel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140216/6c5777de/attachment.html>
More information about the Sugar-devel
mailing list