tsNet or not tsNet?

2018-03-05 Thread Graham Samuel via use-livecode
This message may be a repeat. If you see two copies on the list, I apologise.

===

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 
.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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

tsNet or not tsNet?

2018-03-05 Thread Graham Samuel via use-livecode
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 
.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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: tsNet or not tsNet?

2018-03-05 Thread Charles Warwick via use-livecode
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 
>  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 
> .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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: tsNet or not tsNet?

2018-03-05 Thread Graham Samuel via use-livecode
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 
>  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 
>>  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 
>> .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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: tsNet or not tsNet?

2018-03-06 Thread Bob Sneidar via use-livecode
I am getting the impression that any calls to network functions in your app 
will cause tsNet to be included (assuming you have auto detect on). I could be 
wrong. 

> On Mar 5, 2018, at 02:18 , Graham Samuel via use-livecode 
>  wrote:
> 
> [This message was identified as a phishing scam. Learn about phishing at 
> http://aka.ms/LearnAboutPhishing]
> 
> This message may be a repeat. If you see two copies on the list, I apologise.
> 
> ===
> 
> 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 
> .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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode