Page 1 of 1

Inclusions not loaded?

Posted: Thu Jan 23, 2020 12:10 am
by HansRij
Working in Community Plus I'm still trying to save my app as a standalone for MacOS.
The standalone is created and saved and for the most part is functioning normally. The answer dialogs in the standalone are equal to those in the IDE, but on the "load" or "revPrintText" command the app freezes and becomes unusable.
In "Standalone Application Settings" "Select inclusions" is checked. In the list of inclusions "Answer dialog", "Internet" and "Printing" are checked.
So it seems that the internet and printing libraries have not been loaded. The only difference I can think of is that the "Answer dialog" inclusion had been selected automatically on the first run while the "Printing" and "Internet" inclusions were missing, so I checked them by hand.
Any ideas?

Re: Inclusions not loaded?

Posted: Thu Jan 23, 2020 2:25 am
by dunbarx
Selecting inclusions by hand speeds up the standalone process dramatically. It also fixes unknown issues during the build.

Whatever that means.

All my troubles went away when I started doing it by hand. The internet library should cover the "load" command. Does a basic sample stack with that library and a handler that uses "load" save correctly?

If it does, you may want to send your problem stack to Scotland.

Craig

Re: Inclusions not loaded?

Posted: Thu Jan 23, 2020 7:01 pm
by jacque
See if adding the TSNet library also helps for the load command.

Re: Inclusions not loaded?

Posted: Thu Jan 23, 2020 8:00 pm
by FourthWorld
Inclusions-related confusion comes up often enough that it would seem to merit immediate attention. Does anyone here have the ID number of relevant bug reports on this handy?

Re: Inclusions not loaded?

Posted: Sun Jan 26, 2020 8:51 pm
by HansRij
I created two simple stacks, one containing the revPrintText command and the other the load command.
Saved as standalone for MacOS, inclusions selected by hand.
The revPrintText standalone behaves the same as the stack in the IDE.
The load standalone functions and delivers results, but these are not correct. I enter a URL and load it. In the IDE the command returns a status of "cached" if the URL is valid and "error" if it is not. But in the standalone it always returns "error".
Trying a more advanced internet library, as suggested, is not possible under Community Plus.
My original problem was that the the app froze on these commands. These small test apps don't freeze, so that is a step forward.

Re: Inclusions not loaded?

Posted: Wed Jan 29, 2020 4:23 pm
by HansRij
The behaviour of the "load" command has returned to normal without any significant changes to the test stack. Same results in the standalone and in the IDE. I feel a bit uncomfortable about this.

Re: Inclusions not loaded?

Posted: Tue Mar 10, 2020 8:14 pm
by HansRij
The problem that the "load" command returned incorrect results did not go away, so I submitted an example stack to the LiveCode quality control center. And they found the solution. Many websites use https: nowadays, and for those sites the "load" command needs not only the "Internet" library, but also the "SSL and Encryption" library. So you have to include both when saving as standalone, at least in Community Plus, I don't now about Indy.

Re: Inclusions not loaded?

Posted: Tue Mar 10, 2020 10:10 pm
by FourthWorld
Good sleuthing, Hans. For those interested in following the discussion in the bug report, you can find it here:
https://quality.livecode.com/show_bug.cgi?id=19647