• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
every now and again SDK becomes unusable...
(06-09-2021, 04:43 PM)mark_talluto Wrote: One more thought. If your mainstack is just a splash or loader that in turn loads up your actual app, you can place your init code in one of the mainstacks that are loaded after the fact. LiveCode can update those stacks because only the splash stack has been turned into a standalone.

Hi Mark,
I think discovered the source of error reading cloud data -- since the new SDK, cdb_sync seems to require that tables be loaded first.
i added a loader/splash stack and that did not resolve the issue. I was always able to auth() so it's never been a case of losing authentication. But the app is better for it so sticking with this setup Wink

The app is set to sync all data tables from cloud to local db on user log in - the error was happening here. This evening I noticed a series of error messages that all tables that were to be synced hadn't loaded (this never used to happen with the previous SDK). This would then lead to 'error reading cloud data' (again, never had this error before).

I added code to cdb_loadTable all tables that were to be synced prior to syncing, and lo and behold the errors all went away.
On limited testing with the new SDK, it seems cdb_loadTable is not required for cdb_read (as previously) but is now obligatory for cdb_sync.

This seems to be what caused the endless confusion as prior to the new SDK this wasn't the case. I could just call cdb_sync without loading the tables to memory first. 

Is this intentional? If it is, it should be specified in the documentation (maybe it is, I may have missed it).
If it is intentional, then it seems inconsistent as i can do a cdb_read without loading the tables first...

I've not yet had a chance to do further testing - as with all such things, the issue may prove to be elsewhere, but this has got me up and running with the new SDK (so far at least!)


Messages In This Thread
RE: every now and again SDK becomes unusable... - by stamatis - 06-13-2021, 01:42 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)