tsNet or not tsNet?

Graham Samuel livfoss at mac.com
Mon Mar 5 13:53:15 CET 2018


Thanks, very clear explanation! I’m using Indy (i.e Commercial) versions, so now I understand.

Graham

> On 5 Mar 2018, at 12:27, Charles Warwick via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hi Graham,
> 
> In commercial versions of LiveCode, the default behaviour of the Internet library (libUrl) is to include and use tsNet.
> 
> It calls tsNetInit on startup so that you don’t need to do that separately.
> 
> Hope that helps,
> 
> Charles
> 
>> On 5 Mar 2018, at 7:21 pm, Graham Samuel via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> I’ve been executing this line of script in an app made on a Mac with LC 9.0.0 dp11
>> get URL “http://www.myserver.com/mytextfile <http://www.myserver.com/mytextfile>.txt
>> 
>> It works fine, but I also wanted to detect what happens when the connection can't be established, so I made the command fail by switching off internet access on my machine. I got an error in ‘the result’, as expected. Or at least I got one when the line was executed in the IDE, and this was a tsNet error. As I had not initialised tsNet in my script - according to the dictionary, this **must** be done before tsNet functions are used - I concluded that the IDE had done it for me.
>> 
>> Fair enough, but I then reasoned that if I wanted to see the same kind of explicit error messages in my standalone, I would have to include a call to tsNetInit in my script. However, I created a little test app which **doesn’t** make any tsNet calls, certainly not initialising the package, but I still get a tsNet style error, e.g.
>> 
>>> tsneterr: (6) Could not resolve host: www.myserver.com 
>> 
>> So, what’s going on? Is tsNet now always included in a standalone, and if so, how does it get initialised?
>> 
>> Puzzled, not for the first time.
>> 
>> Graham
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list