[Sugar-devel] A prototype of SugarWeb / SugarAndroid - Technical questions

Lionel Laské lionel at olpc-france.org
Sat Nov 16 15:37:25 EST 2013


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

> When you start an activity for the first time, the shell generates a
> random activityId. It passed it on the the command line to the python
> activity. The activity loads the html page then runs something like this in
> its js context
>
> window.sugar.environment = {activityId:...};
>
> The js activity retrieves it using env.getEnvironment(). It also creates a
> datastore object and put activityId in its metadata (the objectId is
> generated and returned by the datastore).
>
> When you resume an activity, the shell has a datastore object. It gets
> objectId and activityId from it and send them to the js activity through
> the environment as I explained above.
>

Okay it make sense.  Thanks.
Few more questions about link between datastore and journal.
I understand that because each objectId has an activityId, it's easy for
the journal to display the related activity for each datastore entry. Right
? But what if an activity create extra datastore entries ? Is there also
the activtyId field in these extra datastore entries ? If yes, how avoiding
display it in the journal ? Guess also that each datastore entry has a date
time entry ?

                                              Lionel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131116/23a82391/attachment-0001.html>


More information about the Sugar-devel mailing list