LC Web integration is not good enough

Monte Goulding monte at appisle.net
Tue May 1 19:32:26 EDT 2018


> On 2 May 2018, at 9:20 am, Andre Garzia <andre at andregarzia.com> wrote:
> 
> The problem is that no web api expects an object with numeric keys, it expects an honest, real, array. The fact that LC arrays are actually hashmaps is awesome, I love them as well, but it still makes it impossible to export arrays from LC which are really common on Web APIs. JSONExport library should check if the keys of a given array level are all numeric and cast it to a list type.

I think that’s what Mark ended up agreeing with on the bug report. JSONExport probably needs a LCB API does what you expect with the types it is passed and a LCS API that does some of this fudging like checking if a string is a number of if it’s true or false or an array is a list… etc.
> 
> Thats is what I say when RunRev web integration is not good enough. They provide a json import and export function but it doesn't work well enough for you to call any API that expects an array... We always go like 70% or 80% of the way in a feature and then there is a new LC Infinite Ultra Campaign to get some new stuff in when the current stuff is not yet ready.

You did see what I wrote about ArrayToJSON? It’s included in LiveCode also and is also significantly faster than JSONExport.
> 
> Same thing with executing JS inside a WebView Widget, we need to use the "do in widget" statement but this doesn't have a way to bind values, so you end up assembling a JS string by hand in hopes that you got all the correct quotes right because you need to inline all params as literal objects...

Can you open a feature request for this. I presume you mean:

do “something(:1,:2)” in widget “foo” with “bar”,”baz”

Seems quite feasible. The best way to get what you want is to ask for it ;-)

Cheers

Monte


More information about the use-livecode mailing list