[Sugar-devel] sugar-web: env.js questions

Rogelio Mita rogeliomita at activitycentral.com
Fri Nov 22 15:20:31 EST 2013


2013/11/22 Daniel Narvaez <dwnarvaez at gmail.com>

> Yes the callback is never executed because there is no python
> notification. And our test succeeds because it doesn't make sure that the
> callback is called.


Ok, I see...

I am watching
https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity/webactivity.py#L89and
I can see if we are in standalone mode this fragment of code is not
executed (obvious because the activity is not started from sugar) then we
don't have *window.suga*r global var, and I think that it is good and need
be maintained through all cycle (is understood?).
I mean, if you are in *standalone mode* you should not exist *"global"
sugar var*, and in the client side, the logic for *onStandalone* method *is
check that sugar var existence*.
Because I noted the behaviour when *sugar var* don't exists on client
side, this
fragment <https://github.com/sugarlabs/sugar-web/blob/master/env.js#L13>creates
this variable anyway and I do not understand why.

I propose remove this fragment at the moment and make a method
activity.onStandalone (as was already discussed with Manu, I remember) and
the logic can be: checks existence of sugar var, make sence?


-- 
Roger

Activity Central <http://activitycentral.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131122/98107cfb/attachment.html>


More information about the Sugar-devel mailing list