OK, that’s a very general issue - but it would be helpful to know how this is intended to work before we can even think about using them.
-
Which things are cached and which require round-trip to the datastore.
e.g. datastoreGetNumberOfRecordsInCollection() always takes 0 millisecs, so I assume that it is locally cached, and does not check with the datastore.
Does this imply it can’t be relied upon for multi-user apps ?
How would you write an app with multiple users? -
According to the docs Kevin posted recently (which I know are preliminary), some functionality is available in both synch and asynch versions. But there doesn’t appear to be any rhyme or reason about which are available in both forms, and which are only available in one or the other.
e.g. datastoreGetDataOfCollection has both
datastoreGetDataOfRecordOfCollection has only synchronous
datastoreGetDataOfDataview has only asynch -
What is the queuing between synch and asynch ?
If I do an asynch operation, are subsequent synch operations queued behind that ? -
Databindings
Databindings cause fields in the current layout to be updated, but there seems to be no way to know when that has happened.
e.g. for a very basic database backed app (e.g. an address book), with top panel having “prev” and “next” buttons, and a lower panel showing the current record. Clicking on one of those buttons to change the current record will update the lower panel - sometime.
So without databinding, I’d do something like (ignoring corner cases)
set the vis of widget “spinner” to true
wait 0 seconds with messages
put min(gID+1, gNumberOfRecords) into gID
put datastoreGetDataOfRecordOfCollection(“Addresses”, gID) into tRec
– update the fields
set the vis of widget “spinner” to false
wait 0 seconds with messages
with databindings, I’d like to be able to do
put min(gID+1, gNumberOfRecords) into gID
datastoreSetCurrentRecordOfCollection "Addresses", gID
but I can’t properly control the visibility of the spinner because I can’t tell when the databinding update has happened.
5 Missing info.
put datastoreGetDataOfCollection(true,false,“Tasks”) into tRecs
datastoreGetDataOfCollection false,true,“Tasks”, the long id of me, “onGotRecs”, empty
what are the first two parameters ?
and what is the last parameter of the asynch one ?