JsonImport dosen't work in standalone

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Peter@multidesk.se
Posts: 136
Joined: Fri Oct 14, 2011 6:53 am

JsonImport dosen't work in standalone

Post by Peter@multidesk.se » Tue May 02, 2017 1:13 pm

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
/*Whats all the fuss with c# ?*/

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: JsonImport dosen't work in standalone

Post by LiveCode_Panos » Tue May 02, 2017 1:21 pm

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
--

Peter@multidesk.se
Posts: 136
Joined: Fri Oct 14, 2011 6:53 am

Re: JsonImport dosen't work in standalone

Post by Peter@multidesk.se » Tue May 02, 2017 3:58 pm

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
/*Whats all the fuss with c# ?*/

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: JsonImport dosen't work in standalone

Post by shaosean » Tue May 02, 2017 8:16 pm

Does tResult have the data it should have?

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: JsonImport dosen't work in standalone

Post by bangkok » Tue May 02, 2017 10:07 pm

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.

Peter@multidesk.se
Posts: 136
Joined: Fri Oct 14, 2011 6:53 am

Re: JsonImport dosen't work in standalone

Post by Peter@multidesk.se » Wed May 03, 2017 5:49 am

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
/*Whats all the fuss with c# ?*/

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: JsonImport dosen't work in standalone

Post by LiveCode_Panos » Wed May 03, 2017 6:41 am

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
--

Peter@multidesk.se
Posts: 136
Joined: Fri Oct 14, 2011 6:53 am

Re: JsonImport dosen't work in standalone

Post by Peter@multidesk.se » Wed May 03, 2017 7:46 am

Panos,

Here is a simpe test stack


///Peter



jSON test.livecode.zip
(2.4 KiB) Downloaded 323 times
Panos,
/*Whats all the fuss with c# ?*/

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: JsonImport dosen't work in standalone

Post by LiveCode_Panos » Wed May 03, 2017 6:15 pm

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
--

Peter@multidesk.se
Posts: 136
Joined: Fri Oct 14, 2011 6:53 am

Re: JsonImport dosen't work in standalone

Post by Peter@multidesk.se » Thu May 04, 2017 9:31 am

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
/*Whats all the fuss with c# ?*/

Post Reply

Return to “Mac OS”