Page 1 of 1

JsonImport dosen't work in standalone

Posted: Tue May 02, 2017 1:13 pm
by Peter@multidesk.se
This line works fine in the IDE, but not in the standalone build.

put jsonImport (tResult) into tResArray

Why, What have i missed?

Does it have anything to do with the fact that i can't open the inclusions pane
in the standalone settings? (And therefore can't get access to the settings in that pane)
and of course I have to ask if anyone knows, why is that?

anyone?


///Peter

Re: JsonImport dosen't work in standalone

Posted: Tue May 02, 2017 1:21 pm
by LiveCode_Panos
Hi Peter,

In the standalone settings, in "General" pane, choose "Select Inclusions" (rather than "Search for Inclusions"). This will enable the "Inclusions" pane. Then, you can select the JSON library for inclusion in the standalone.

I hope this helps.

Best,
Panos
--

Re: JsonImport dosen't work in standalone

Posted: Tue May 02, 2017 3:58 pm
by Peter@multidesk.se
Thanks Panos,

Now i can select jSON library. The problem, however remains, it still dosen't work.

The code stop execute att the same line as before in the standalone, but works fine in the IDE.

Any new suggestion?


///Peter

Re: JsonImport dosen't work in standalone

Posted: Tue May 02, 2017 8:16 pm
by shaosean
Does tResult have the data it should have?

Re: JsonImport dosen't work in standalone

Posted: Tue May 02, 2017 10:07 pm
by bangkok
I have the same problem with 8.1.4 rc1.

I'm on windows 8.

But by selecting manually the inclusion of JSON library, it's working.

Re: JsonImport dosen't work in standalone

Posted: Wed May 03, 2017 5:49 am
by Peter@multidesk.se
I can not tell if tResult is holding any data in the stand alone.
When I was trying to find out what was going wrong, l put an "answer command " on both sides of the line with "jsonImport" and I could not get that second answer.
It's just stopp execute the code at that line for some reason.
But as I said, everything works just fine in the IDE

///Peter

Re: JsonImport dosen't work in standalone

Posted: Wed May 03, 2017 6:41 am
by LiveCode_Panos
Peter,

Could you attach a simple sample stack that exhibits the problem, so as we can test? Maybe there is something else in the code that causes an error in the standalone *before* this line is reached, so this code is never executed.

Best,
Panos
--

Re: JsonImport dosen't work in standalone

Posted: Wed May 03, 2017 7:46 am
by Peter@multidesk.se
Panos,

Here is a simpe test stack


///Peter



jSON test.livecode.zip
(2.4 KiB) Downloaded 326 times
Panos,

Re: JsonImport dosen't work in standalone

Posted: Wed May 03, 2017 6:15 pm
by LiveCode_Panos
Hi Peter,

I had a look at the sample stack. The call to

Code: Select all

put jsonImport (tResult) into tResArray 
fails silently because "tResult" is empty in the standalone.

tResult gets its value by the call to:

Code: Select all

post tData to URL myUrl
put it into tResult
In the standalone, you have not included the "Internet" library (in "Inclusions" pane), so the "post" call fails and tResult is empty.

So if you add the "Internet" inclusion the problem should be fixed.

Best,
Panos
--

Re: JsonImport dosen't work in standalone

Posted: Thu May 04, 2017 9:31 am
by Peter@multidesk.se
Panos,

That did it!

Before this i use the "Search for Inclusions", but it doesn't seem that LC manage to include the jSON-library with that search.
Because it worked fine then, (apparently LC could search for and detect the "Internet-library"), I just steered me blind at the wrong problem.

Million THX


///Peter