<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class=""><div class="gmail_extra"><br></div></div><div class="gmail_extra">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.<br>
<br></div></div></blockquote><div>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.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra">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.<br>

</div></div>
</blockquote></div><br></div><div class="gmail_extra">Today, I think there is no problem about this. We could do a sync version.</div><div class="gmail_extra">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.</div>
<div class="gmail_extra">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.</div>
<div class="gmail_extra">A better implementation could may be call the callback when loadAsText don't find and existing object.</div><div class="gmail_extra">Both my recent web activities (FoodChain and Abecedarium) has the same issue.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">               Lionel.</div><div class="gmail_extra"><br></div></div>