[Sugar-devel] Datastore API for html activities
Daniel Narvaez
dwnarvaez at gmail.com
Mon May 27 16:21:02 EDT 2013
On 27 May 2013 22:16, Daniel Narvaez <dwnarvaez at gmail.com> wrote:
> Save an object
>
> textObject = datastore.TextObject();
> textObject.setText("Hello");
> textObject.setMetadata({"title": "hello"});
> textObject.save(onWrote);
>
> Load an object
>
> textObject = datastore.TextObject();
> textObject.load(onGotText);
> textObject.getMetadata(onGotMetadata);
>
>
Probably StringObject would be less ambiguous than TextObject.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130527/42206c91/attachment-0001.html>
More information about the Sugar-devel
mailing list