[Sugar-devel] Datastore API for html activities (Daniel Narvaez)
lionel at olpc-france.org
lionel at olpc-france.org
Wed May 29 15:45:46 EDT 2013
> I wonder if we actually need something like that (we have an activity
object where we could put it) or if it's better to just let the activity
> author decide when saving/loading is necessary, using the TextObject stuff
I proposed.
> It feels a bit inflexible to have the activity request read/writes so
directly. I'd rather have notification that the activity is closing, then
the
> activity author decides what needs to be done.
Not fully agree. The easiest activity has just to write a single entry in
the journal with standard metadata and a screen capture. In Python,
nothing has to be written to create this entry. I guess that its why the
read_file and write_file has been written. So I think we must provide the
same feature in the HTML DataStore API instead of forcing to create a new
entry each time.
> datastore.find(query, properties, onFound);
> I have no idea what query/properties contains but I suppose it's
documented somewhere :)
Yes here :-) [1]
query is for full-text search, properties is for filter search.
> Can you explain the use case for these?
To write an activity like SugarCommander [2].
Lionel.
[1]
http://wiki.sugarlabs.org/go/Development_Team/Low-level_Activity_API#Queryin
g
[2] http://activities.sugarlabs.org/fr/sugar/addon/4291
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130529/2b467b85/attachment.html>
More information about the Sugar-devel
mailing list