Re: tsNet FTP help

2021-03-02 Thread scott--- via use-livecode
Thank you, Charles. I had actually started with that lesson… I just didn’t 
realize how they went together. Your hint (and lessons!) was exactly what I 
needed.
—
Scott Morrow

> On Mar 2, 2021, at 7:29 PM, Charles Warwick via use-livecode 
>  wrote:
> 
> Hi Scott,
> 
> This part of the server response is your clue:
> 
>> 421-Sorry, cleartext sessions and weak ciphers are not accepted on this 
>> server.
>> 421 Please reconnect using TLS security mechanisms.
> 
> You need to connect to the FTP server using SSL.  The following LC lesson 
> should help:
> 
> https://lessons.livecode.com/m/4071/l/857714-how-to-use-tsnet-to-connect-to-an-ftp-server-over-ssl-ftps
> 
> Regards,
> 
> Charles
> 
>> On 3 Mar 2021, at 11:42 am, scott--- via use-livecode 
>>  wrote:
>> 
>> Hello Folks (Matthias?),
>> 
>> I am trying to use tsNet to upload a file to my mHost account. Although the 
>> lesson  
>> 
>>   seemed very straight forward, I am not making any headway.  I am using LC 
>> 9.6.2 (rc 2) Business, OSX 11.2.1 Big Sur (MBP 2017). I've included the 
>> pertinent portion of script and the server response below. Any suggestions 
>> welcome.
>> --
>> Scott Morrow
>> 
>> Elementary Software
>> (Now with 20% less chalk dust!)
>> web   https://elementarysoftware.com/
>> email sc...@elementarysoftware.com
>> booth1-360-734-4701
>> ———
>> 
>> My LiveCode script:
>> 
>> 
>> tsNetInit -- NOT in lesson?
>> 
>> put "ftp://myUserName.serversignin.com; into tFtpServer --
>> 
>> put "/public_html" into tFtpDirectory
>> 
>> put "myUserName" into tSettings["username"]
>> 
>> put “myPassWord" into tSettings["password"]
>> 
>> set the itemDel to SLASH
>> 
>> put item -1 of tFilePath into tFileName
>> 
>> put URL("file:" & tFilePath) into tFileContents
>> 
>> put tsNetUploadSync(tFtpServer & tFtpDirectory & slash & tFileName, 
>> tHeaders, tFileContents, tRecvHeaders, tResult, tBytes, tSettings) into 
>> tOutput
>> 
>> ——— Response from the server ——— 
>> 
>> 
>> the result:  tsneterr: (28) Timeout was reached (this is returned almost 
>> instantly)
>> 
>> 
>> tRecvHeaders:
>> 
>> 220-- Welcome to Pure-FTPd [privsep] [TLS] --
>> 
>> 
>> 
>> 220-You are user number 3 of 188 allowed.
>> 
>> 
>> 
>> 220-Local time is now 00:15. Server port: 21.
>> 
>> 
>> 
>> 220-This is a private system - No anonymous login
>> 
>> 
>> 
>> 220-IPv6 connections are also welcome on this server.
>> 
>> 
>> 
>> 220 You will be disconnected after 30 minutes of inactivity.
>> 
>> 
>> 
>> 421-Sorry, cleartext sessions and weak ciphers are not accepted on this 
>> server.
>> 
>> 
>> 
>> 421 Please reconnect using TLS security mechanisms.
>> 
>> 
>> tsNetGetTimeouts() —>   60,0,30,6,0,0
>> 
>> 
>> 
>> 
>> 
>> 
>> ___
>> 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: Version 1.2 of the mail stack

2021-03-02 Thread Charles Warwick via use-livecode
Hi Rick,

Assuming you are using the code from the lesson, just add any Bcc e-mail 
addresses to the tRecipient variable before the call to tsNetSmtpSync.

Since you don't include them in the variables passed to mimeEncodeAsMIMEEmail, 
the addresses won't be included in the e-mail headers.

Regards,

Charles

> On 3 Mar 2021, at 12:44 pm, Rick Harrison via use-livecode 
>  wrote:
> 
> Hi Matthias,
> 
> I got it to work!
> 
> I just needed the statement:
> 
> tsNetInit
> 
> Now it works great!
> 
> Is there anyway I can put in a  BCC email address instead of CC?
> 
> Thanks!
> 
> Rick
> 
>> On Mar 2, 2021, at 6:19 PM, matthias rebbe via use-livecode 
>>  wrote:
>> 
>> no, only the file which is suitable for the OS on which the Livecode Server 
>> is running.
>> For Windows it would be one of the .dll files, for Linux one of the .so 
>> files. The file with the 64 in its filename is for the 64bit version of the 
>> os, the other one for the 32bit verision.
>> 
>> So for macOS i would assume the tsNet.bundle. But there is also a 
>> tsNET.dylib file, which according to the suffix belongs also to macOS.
>> I am not sure. Maybe you should copy both of them.
>> 
>> But maybe someone could chime in about this.
>> 
>> 
>> 
>> -
>> Matthias Rebbe
>> Life Is Too Short For Boring Code
>> 
 Am 02.03.2021 um 23:54 schrieb Rick Harrison via use-livecode 
 :
>>> 
>>> Hi Matthias,
>>> 
>>> What I’m seeing is:
>>> 
>>> Applications
>>> LiveCode (App)
>>> (Right Click)Show Package Contents
>>> Contents
>>> Tools
>>> Ext
>>> tsNet_INDY_1.4.2 (Folder Full of tsNet stuff)
>>> 
>>> Do I want the entire folder?
>>> 
>>> Do I just want:
>>> 
>>> tsNet.bundle
>>> tsNet.dylib
>>> tsnetliburl.livecodescript
>>> 
>>> There’s a lot of items.
>>> 
>>> Thanks,
>>> 
>>> Rick
>>> 
 On Mar 2, 2021, at 5:23 PM, matthias rebbe via use-livecode 
  wrote:
 
 it seems tsNet is missing in your installation of Livecode Server.
 
 Please create a folder externals in the folder where livecode server is 
 installed.
 Then copy the tsNet external from you Livecode Desktop installation into 
 the newly created externals folder.
 
 That should do.
 
 Regards,
>>> 
>>> ___
>>> 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


___
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 FTP help

2021-03-02 Thread Charles Warwick via use-livecode
Hi Scott,

This part of the server response is your clue:

> 421-Sorry, cleartext sessions and weak ciphers are not accepted on this 
> server.
> 421 Please reconnect using TLS security mechanisms.

You need to connect to the FTP server using SSL.  The following LC lesson 
should help:

https://lessons.livecode.com/m/4071/l/857714-how-to-use-tsnet-to-connect-to-an-ftp-server-over-ssl-ftps

Regards,

Charles

> On 3 Mar 2021, at 11:42 am, scott--- via use-livecode 
>  wrote:
> 
> Hello Folks (Matthias?),
> 
> I am trying to use tsNet to upload a file to my mHost account. Although the 
> lesson  
>  
>  seemed very straight forward, I am not making any headway.  I am using LC 
> 9.6.2 (rc 2) Business, OSX 11.2.1 Big Sur (MBP 2017). I've included the 
> pertinent portion of script and the server response below. Any suggestions 
> welcome.
> --
> Scott Morrow
> 
> Elementary Software
> (Now with 20% less chalk dust!)
> web   https://elementarysoftware.com/
> email sc...@elementarysoftware.com
> booth1-360-734-4701
> ———
> 
> My LiveCode script:
> 
> 
> tsNetInit -- NOT in lesson?
> 
> put "ftp://myUserName.serversignin.com; into tFtpServer --
> 
> put "/public_html" into tFtpDirectory
> 
> put "myUserName" into tSettings["username"]
> 
> put “myPassWord" into tSettings["password"]
> 
> set the itemDel to SLASH
> 
> put item -1 of tFilePath into tFileName
> 
> put URL("file:" & tFilePath) into tFileContents
> 
> put tsNetUploadSync(tFtpServer & tFtpDirectory & slash & tFileName, tHeaders, 
> tFileContents, tRecvHeaders, tResult, tBytes, tSettings) into tOutput
> 
> ——— Response from the server ——— 
> 
> 
> the result:  tsneterr: (28) Timeout was reached (this is returned almost 
> instantly)
> 
> 
> tRecvHeaders:
> 
> 220-- Welcome to Pure-FTPd [privsep] [TLS] --
> 
> 
> 
> 220-You are user number 3 of 188 allowed.
> 
> 
> 
> 220-Local time is now 00:15. Server port: 21.
> 
> 
> 
> 220-This is a private system - No anonymous login
> 
> 
> 
> 220-IPv6 connections are also welcome on this server.
> 
> 
> 
> 220 You will be disconnected after 30 minutes of inactivity.
> 
> 
> 
> 421-Sorry, cleartext sessions and weak ciphers are not accepted on this 
> server.
> 
> 
> 
> 421 Please reconnect using TLS security mechanisms.
> 
> 
> tsNetGetTimeouts() —>   60,0,30,6,0,0
> 
> 
> 
> 
> 
> 
> ___
> 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: Version 1.2 of the mail stack

2021-03-02 Thread Rick Harrison via use-livecode
Hi Matthias,

I got it to work!

I just needed the statement:

tsNetInit

Now it works great!

Is there anyway I can put in a  BCC email address instead of CC?

Thanks!

Rick

> On Mar 2, 2021, at 6:19 PM, matthias rebbe via use-livecode 
>  wrote:
> 
> no, only the file which is suitable for the OS on which the Livecode Server 
> is running.
> For Windows it would be one of the .dll files, for Linux one of the .so 
> files. The file with the 64 in its filename is for the 64bit version of the 
> os, the other one for the 32bit verision.
> 
> So for macOS i would assume the tsNet.bundle. But there is also a tsNET.dylib 
> file, which according to the suffix belongs also to macOS.
> I am not sure. Maybe you should copy both of them.
> 
> But maybe someone could chime in about this.
> 
> 
> 
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
> 
>> Am 02.03.2021 um 23:54 schrieb Rick Harrison via use-livecode 
>> :
>> 
>> Hi Matthias,
>> 
>> What I’m seeing is:
>> 
>> Applications
>> LiveCode (App)
>> (Right Click)Show Package Contents
>> Contents
>> Tools
>> Ext
>> tsNet_INDY_1.4.2 (Folder Full of tsNet stuff)
>> 
>> Do I want the entire folder?
>> 
>> Do I just want:
>> 
>> tsNet.bundle
>> tsNet.dylib
>> tsnetliburl.livecodescript
>> 
>> There’s a lot of items.
>> 
>> Thanks,
>> 
>> Rick
>> 
>>> On Mar 2, 2021, at 5:23 PM, matthias rebbe via use-livecode 
>>>  wrote:
>>> 
>>> it seems tsNet is missing in your installation of Livecode Server.
>>> 
>>> Please create a folder externals in the folder where livecode server is 
>>> installed.
>>> Then copy the tsNet external from you Livecode Desktop installation into 
>>> the newly created externals folder.
>>> 
>>> That should do.
>>> 
>>> Regards,
>> 
>> ___
>> 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: sort container parameters

2021-03-02 Thread Curry Kenworthy via use-livecode



Paul:

> apparently neither the sort direction (ascending|descending)
> nor the sort type (international|text|datetime|numeric|binary)
> can be variable!

> I see this a a bug or perhaps a failure to fully
> robust impliment the sort container command?
> Does any one else see this as a bug?

Absolutely a bug or extremely annoying limitation!
I've been hating this for a long time.

> I suppose I could work around it with a "do"
> but that seems like a cludge

There has been no performance hit for "do" as a one-off.
So I don't mind using "do" once. I try to avoid it in loops.
Test, and you'll see that in your results.

Meanwhile "do" is arguably cleaner and smaller code than if/else.
But still a clumsy abomination compared to using an inline variable.

Any bug report on this issue gets my vote! Yes, it's a bad thing.

Best wishes,

Curry Kenworthy

Custom Software Development
"Better Methods, Better Results"
LiveCode Training and Consulting
http://livecodeconsulting.com/

___
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: Version 1.2 of the mail stack

2021-03-02 Thread Rick Harrison via use-livecode
Hi Matthias,

I put tsNet.dylib into the already existing externals folder
that was inside of the CGI-Executables folder where
the revdb.dylib and others reside as it seemed to be
the logical choice.  The error I was getting went away
and the script completes, but no message gets sent out.

I think we are close, but I must be missing some key
ingredient somewhere.

I’m thinking the tsNet.bundle file is just for building iOS Apps,
because I can’t find .bundle files in the server anywhere.

Thanks,

Rick

> On Mar 2, 2021, at 6:19 PM, matthias rebbe via use-livecode 
>  wrote:
> 
> no, only the file which is suitable for the OS on which the Livecode Server 
> is running.
> For Windows it would be one of the .dll files, for Linux one of the .so 
> files. The file with the 64 in its filename is for the 64bit version of the 
> os, the other one for the 32bit verision.
> 
> So for macOS i would assume the tsNet.bundle. But there is also a tsNET.dylib 
> file, which according to the suffix belongs also to macOS.
> I am not sure. Maybe you should copy both of them.
> 
> But maybe someone could chime in about this.
> 
> 
> 
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code


___
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 FTP help

2021-03-02 Thread scott--- via use-livecode
Hello Folks (Matthias?),

I am trying to use tsNet to upload a file to my mHost account. Although the 
lesson  
  
seemed very straight forward, I am not making any headway.  I am using LC 9.6.2 
(rc 2) Business, OSX 11.2.1 Big Sur (MBP 2017). I've included the pertinent 
portion of script and the server response below. Any suggestions welcome.
--
Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
web   https://elementarysoftware.com/
email sc...@elementarysoftware.com
booth1-360-734-4701
———

My LiveCode script:


tsNetInit -- NOT in lesson?

put "ftp://myUserName.serversignin.com; into tFtpServer --

put "/public_html" into tFtpDirectory

put "myUserName" into tSettings["username"]

put “myPassWord" into tSettings["password"]

set the itemDel to SLASH

put item -1 of tFilePath into tFileName

put URL("file:" & tFilePath) into tFileContents

put tsNetUploadSync(tFtpServer & tFtpDirectory & slash & tFileName, tHeaders, 
tFileContents, tRecvHeaders, tResult, tBytes, tSettings) into tOutput

——— Response from the server ——— 


the result:  tsneterr: (28) Timeout was reached (this is returned almost 
instantly)


tRecvHeaders:

220-- Welcome to Pure-FTPd [privsep] [TLS] --



220-You are user number 3 of 188 allowed.



220-Local time is now 00:15. Server port: 21.



220-This is a private system - No anonymous login



220-IPv6 connections are also welcome on this server.



220 You will be disconnected after 30 minutes of inactivity.



421-Sorry, cleartext sessions and weak ciphers are not accepted on this server.



421 Please reconnect using TLS security mechanisms.


tsNetGetTimeouts() —>   60,0,30,6,0,0






___
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: sort container parameters

2021-03-02 Thread Alex Tweedly via use-livecode

The number of lines being sorted makes o difference.

The number of distinct sorts will - but at a single 'do' for each of 
"several hundreds", you'll not even notice except (maybe) if you are 
benchmarking it (around 5ms per 1000 'do's on an elderly MacBook Pro).


Alex.

On 02/03/2021 22:52, Paul Dupuis via use-livecode wrote:

Okay. Thank you Ralph.

I was reluctant to use "do" for performance reasons. The sort could be 
sorting a large number of lines - as many as several hundred sorts of 
a thousand to ten thousand lines.


I could of course do timing trials, but does anyone from the 
mothership (or anyone period) know if using "do" with a container sort 
causes any appreciable performance hit? All the data is in a variable 
(vs fields).



On 3/2/2021 5:19 PM, Ralph DiMola via use-livecode wrote:
I found that you must us a "Do"(thank heaven for "Do"s) if you want 
to make variable any LC token that colorizes like "stack", "the", 
"field", "button", "put" or "ascending".


I don't think "Do" is a kludge is this case.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On 
Behalf Of Paul Dupuis via use-livecode

Sent: Tuesday, March 02, 2021 4:56 PM
To: use-livecode@lists.runrev.com
Cc: Paul Dupuis
Subject: sort container parameters

I just discovered much to my dismay that you can not execute the 
following:


put "ascending" into tDirection
soft lines of tContainer tDirection international

apparently neither the sort direction (ascending|descending) nor the 
sort type (international|text|datetime|numeric|binary) can be variable!


That means if you want to parameterize a sort direction, you have to 
do something like:


if tDirection is "ascending" then
    sort lines of tContainer ascending international else
    sort lines of tCOntainer descending international end if

I see this a a bug or perhaps a failure to fully robust impliment the 
sort container command? Does any one else see this as a bug?


I suppose I could work around it with a "do" but that seems like a 
cludge


do ("sort line of tContainer" && tDirection && tSortType)

Thoughts? Comments? Opinions? Am I expecting too much of LiveCode to 
have sort direction and type actual parameters?



___
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


___
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: sort container parameters

2021-03-02 Thread Bob Sneidar via use-livecode
If it is a lot to sort, I am wondering why not use a memory database with the 
indexes you need to sort by, or a file database if the data needs to be 
persistent?

Bob S


On Mar 2, 2021, at 2:52 PM, Paul Dupuis via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Okay. Thank you Ralph.

I was reluctant to use "do" for performance reasons. The sort could be sorting 
a large number of lines - as many as several hundred sorts of a thousand to ten 
thousand lines.

I could of course do timing trials, but does anyone from the mothership (or 
anyone period) know if using "do" with a container sort causes any appreciable 
performance hit? All the data is in a variable (vs fields).

___
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: Version 1.2 of the mail stack

2021-03-02 Thread matthias rebbe via use-livecode
no, only the file which is suitable for the OS on which the Livecode Server is 
running.
For Windows it would be one of the .dll files, for Linux one of the .so files. 
The file with the 64 in its filename is for the 64bit version of the os, the 
other one for the 32bit verision.

So for macOS i would assume the tsNet.bundle. But there is also a tsNET.dylib 
file, which according to the suffix belongs also to macOS.
I am not sure. Maybe you should copy both of them.

But maybe someone could chime in about this.



-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 02.03.2021 um 23:54 schrieb Rick Harrison via use-livecode 
> :
> 
> Hi Matthias,
> 
> What I’m seeing is:
> 
> Applications
> LiveCode (App)
> (Right Click)Show Package Contents
> Contents
> Tools
> Ext
> tsNet_INDY_1.4.2 (Folder Full of tsNet stuff)
> 
> Do I want the entire folder?
> 
> Do I just want:
> 
> tsNet.bundle
> tsNet.dylib
> tsnetliburl.livecodescript
> 
> There’s a lot of items.
> 
> Thanks,
> 
> Rick
> 
>> On Mar 2, 2021, at 5:23 PM, matthias rebbe via use-livecode 
>>  wrote:
>> 
>> it seems tsNet is missing in your installation of Livecode Server.
>> 
>> Please create a folder externals in the folder where livecode server is 
>> installed.
>> Then copy the tsNet external from you Livecode Desktop installation into the 
>> newly created externals folder.
>> 
>> That should do.
>> 
>> Regards,
> 
> ___
> 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: Version 1.2 of the mail stack

2021-03-02 Thread Rick Harrison via use-livecode
Hi Matthias,

What I’m seeing is:

Applications
LiveCode (App)
(Right Click)Show Package Contents
Contents
Tools
Ext
tsNet_INDY_1.4.2 (Folder Full of tsNet stuff)

Do I want the entire folder?

Do I just want:

tsNet.bundle
tsNet.dylib
tsnetliburl.livecodescript

There’s a lot of items.

Thanks,

Rick

> On Mar 2, 2021, at 5:23 PM, matthias rebbe via use-livecode 
>  wrote:
> 
> it seems tsNet is missing in your installation of Livecode Server.
> 
> Please create a folder externals in the folder where livecode server is 
> installed.
> Then copy the tsNet external from you Livecode Desktop installation into the 
> newly created externals folder.
> 
> That should do.
> 
> Regards,

___
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: sort container parameters

2021-03-02 Thread Paul Dupuis via use-livecode

Okay. Thank you Ralph.

I was reluctant to use "do" for performance reasons. The sort could be 
sorting a large number of lines - as many as several hundred sorts of a 
thousand to ten thousand lines.


I could of course do timing trials, but does anyone from the mothership 
(or anyone period) know if using "do" with a container sort causes any 
appreciable performance hit? All the data is in a variable (vs fields).



On 3/2/2021 5:19 PM, Ralph DiMola via use-livecode wrote:

I found that you must us a "Do"(thank heaven for "Do"s) if you want to make variable any LC token that colorizes like "stack", 
"the", "field", "button", "put" or "ascending".

I don't think "Do" is a kludge is this case.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of 
Paul Dupuis via use-livecode
Sent: Tuesday, March 02, 2021 4:56 PM
To: use-livecode@lists.runrev.com
Cc: Paul Dupuis
Subject: sort container parameters

I just discovered much to my dismay that you can not execute the following:

put "ascending" into tDirection
soft lines of tContainer tDirection international

apparently neither the sort direction (ascending|descending) nor the sort type 
(international|text|datetime|numeric|binary) can be variable!

That means if you want to parameterize a sort direction, you have to do 
something like:

if tDirection is "ascending" then
sort lines of tContainer ascending international else
sort lines of tCOntainer descending international end if

I see this a a bug or perhaps a failure to fully robust impliment the sort 
container command? Does any one else see this as a bug?

I suppose I could work around it with a "do" but that seems like a cludge

do ("sort line of tContainer" && tDirection && tSortType)

Thoughts? Comments? Opinions? Am I expecting too much of LiveCode to have sort 
direction and type actual parameters?


___
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: Version 1.2 of the mail stack

2021-03-02 Thread matthias rebbe via use-livecode
it seems tsNet is missing in your installation of Livecode Server.

Please create a folder externals in the folder where livecode server is 
installed.
Then copy the tsNet external from you Livecode Desktop installation into the 
newly created externals folder.

That should do.

Regards,


-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 02.03.2021 um 23:10 schrieb Rick Harrison via use-livecode 
> :
> 
> Hi Matthias,
> 
> I put mime.livecodescript into the folder with the script that call it.
> 
> I put in the start using “mime.livecodescript” statement.
> 
> When I run the script, I now get:
> 
> Function: error in function handler (tsNetSmtpSync)
> 
> which is pointing to:
> 
> put tsNetSmtpSync(tURL, tFrom, tRecipient, tEmailMessage, tResponseHeaders, 
> tBytes, tSettings) into tResult
> 
> I do not see this function in mime.livecodescript so where does tsNetSmtpSync 
> hang out?
> 
> Is that a part of " it was mandatory to run  tsInit   first in the Livecode 
> Server script to initialize tsNET”?
> 
> Where is that and how do I run it?  Another start using command?
> 
> Thanks,
> 
> Rick
> 
> 
> 
> 
> 
> 
>> On Mar 2, 2021, at 12:55 PM, matthias rebbe via use-livecode 
>>  wrote:
>> 
>> I would copy the complete file mime.livecodescript to the server.
>> The file can be found in the Extensions folder either in the app bundle 
>> (macOS) or  the Livecode program folder under program files (Windows).
>> 
>> In your script  use 'start using" to use the library
>> e.g.
>> start using  "mime.livecodescript"
>> 
>> put "test" into the templatefield
>> put mimeEncodeFieldAsMIMEMultipartDocument(the long id of the templatefield) 
>> into tBody
>> 
>> 
>> 
>> 
>> Regarding tsNet:
>> I am at HostM and i am using LivecodeServer Business in my accounts.
>> HostM has LivecodeServer Community installed by default for every account.
>> But if a customer can proof the purchase/subscription of an Indy or Business 
>> License, they even install the Indy or Business version of Livecode Server 
>> for the that customer accounts.
>> 
>> In the past it was mandatory to run  tsInit   first in the Livecode Server 
>> script to initialize tsNET.
>> 
>> 
>> 
>> Regards,
>> Matthias
>> 
>> 
>> 
>> Matthias Rebbe
>> -
>> Matthias Rebbe
>> Life Is Too Short For Boring Code
>> 
>>> Am 02.03.2021 um 17:56 schrieb Rick Harrison via use-livecode 
>>> :
>>> 
>>> Hi Matthias,
>>> 
>>> Ok, I only see mimeEncodeFieldAsMIMEMultipartDocument in
>>> com.livecode.library.mime and not in the TsNetLibUrl, so I
>>> guess that answers that question.
>>> 
>>> If I’m incorrect somehow, please let me know.
>>> 
>>> Thanks,
>>> 
>>> Rick
>>> 
 On Mar 1, 2021, at 7:09 PM, matthias rebbe via use-livecode 
  wrote:
 
 mimeEncodeFieldAsMIMEMultipartDocument
>>> 
>>> ___
>>> 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


___
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: sort container parameters

2021-03-02 Thread Ralph DiMola via use-livecode
I found that you must us a "Do"(thank heaven for "Do"s) if you want to make 
variable any LC token that colorizes like "stack", "the", "field", "button", 
"put" or "ascending".

I don't think "Do" is a kludge is this case. 

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of 
Paul Dupuis via use-livecode
Sent: Tuesday, March 02, 2021 4:56 PM
To: use-livecode@lists.runrev.com
Cc: Paul Dupuis
Subject: sort container parameters

I just discovered much to my dismay that you can not execute the following:

put "ascending" into tDirection
soft lines of tContainer tDirection international

apparently neither the sort direction (ascending|descending) nor the sort type 
(international|text|datetime|numeric|binary) can be variable!

That means if you want to parameterize a sort direction, you have to do 
something like:

if tDirection is "ascending" then
   sort lines of tContainer ascending international else
   sort lines of tCOntainer descending international end if

I see this a a bug or perhaps a failure to fully robust impliment the sort 
container command? Does any one else see this as a bug?

I suppose I could work around it with a "do" but that seems like a cludge

do ("sort line of tContainer" && tDirection && tSortType)

Thoughts? Comments? Opinions? Am I expecting too much of LiveCode to have sort 
direction and type actual parameters?


___
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: Version 1.2 of the mail stack

2021-03-02 Thread Rick Harrison via use-livecode
Hi Matthias,

I put mime.livecodescript into the folder with the script that call it.

I put in the start using “mime.livecodescript” statement.

When I run the script, I now get:

Function: error in function handler (tsNetSmtpSync)

which is pointing to:

put tsNetSmtpSync(tURL, tFrom, tRecipient, tEmailMessage, tResponseHeaders, 
tBytes, tSettings) into tResult

I do not see this function in mime.livecodescript so where does tsNetSmtpSync 
hang out?

Is that a part of " it was mandatory to run  tsInit   first in the Livecode 
Server script to initialize tsNET”?

Where is that and how do I run it?  Another start using command?

Thanks,

Rick






> On Mar 2, 2021, at 12:55 PM, matthias rebbe via use-livecode 
>  wrote:
> 
> I would copy the complete file mime.livecodescript to the server.
> The file can be found in the Extensions folder either in the app bundle 
> (macOS) or  the Livecode program folder under program files (Windows).
> 
> In your script  use 'start using" to use the library
> e.g.
> start using  "mime.livecodescript"
> 
> put "test" into the templatefield
> put mimeEncodeFieldAsMIMEMultipartDocument(the long id of the templatefield) 
> into tBody
> 
> 
> 
> 
> Regarding tsNet:
> I am at HostM and i am using LivecodeServer Business in my accounts.
> HostM has LivecodeServer Community installed by default for every account.
> But if a customer can proof the purchase/subscription of an Indy or Business 
> License, they even install the Indy or Business version of Livecode Server 
> for the that customer accounts.
> 
> In the past it was mandatory to run  tsInit   first in the Livecode Server 
> script to initialize tsNET.
> 
> 
> 
> Regards,
> Matthias
> 
> 
> 
> Matthias Rebbe
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
> 
>> Am 02.03.2021 um 17:56 schrieb Rick Harrison via use-livecode 
>> :
>> 
>> Hi Matthias,
>> 
>> Ok, I only see mimeEncodeFieldAsMIMEMultipartDocument in
>> com.livecode.library.mime and not in the TsNetLibUrl, so I
>> guess that answers that question.
>> 
>> If I’m incorrect somehow, please let me know.
>> 
>> Thanks,
>> 
>> Rick
>> 
>>> On Mar 1, 2021, at 7:09 PM, matthias rebbe via use-livecode 
>>>  wrote:
>>> 
>>> mimeEncodeFieldAsMIMEMultipartDocument
>> 
>> ___
>> 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


sort container parameters

2021-03-02 Thread Paul Dupuis via use-livecode

I just discovered much to my dismay that you can not execute the following:

put "ascending" into tDirection
soft lines of tContainer tDirection international

apparently neither the sort direction (ascending|descending) nor the 
sort type (international|text|datetime|numeric|binary) can be variable!


That means if you want to parameterize a sort direction, you have to do 
something like:


if tDirection is "ascending" then
  sort lines of tContainer ascending international
else
  sort lines of tCOntainer descending international
end if

I see this a a bug or perhaps a failure to fully robust impliment the 
sort container command? Does any one else see this as a bug?


I suppose I could work around it with a "do" but that seems like a cludge

do ("sort line of tContainer" && tDirection && tSortType)

Thoughts? Comments? Opinions? Am I expecting too much of LiveCode to 
have sort direction and type actual parameters?



___
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: Version 1.2 of the mail stack

2021-03-02 Thread matthias rebbe via use-livecode
When i did test it some time ago, i've put it in the same folder where the 
livecode server script that used the library was located.


-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 02.03.2021 um 21:05 schrieb Rick Harrison via use-livecode 
> :
> 
> Hi Matthias,
> 
> I managed to find mime.livecodescript.
> 
> What folder do I need to put it into on my macOS Catalina LC Server?
> 
> Thanks,
> 
> Rick
> 
>> On Mar 2, 2021, at 12:55 PM, matthias rebbe via use-livecode 
>>  wrote:
>> 
>> I would copy the complete file mime.livecodescript to the server.
>> The file can be found in the Extensions folder either in the app bundle 
>> (macOS) or  the Livecode program folder under program files (Windows).
>> 
>> In your script  use 'start using" to use the library
>> e.g.
>> start using  "mime.livecodescript"
>> 
>> put "test" into the templatefield
>> put mimeEncodeFieldAsMIMEMultipartDocument(the long id of the templatefield) 
>> into tBody
>> 
>> 
>> 
>> 
>> Regarding tsNet:
>> I am at HostM and i am using LivecodeServer Business in my accounts.
>> HostM has LivecodeServer Community installed by default for every account.
>> But if a customer can proof the purchase/subscription of an Indy or Business 
>> License, they even install the Indy or Business version of Livecode Server 
>> for the that customer accounts.
>> 
>> In the past it was mandatory to run  tsInit   first in the Livecode Server 
>> script to initialize tsNET.
>> 
>> 
>> 
>> Regards,
>> Matthias
>> 
>> 
>> 
>> Matthias Rebbe
>> -
>> Matthias Rebbe
>> Life Is Too Short For Boring Code
>> 
>>> Am 02.03.2021 um 17:56 schrieb Rick Harrison via use-livecode 
>>> :
>>> 
>>> Hi Matthias,
>>> 
>>> Ok, I only see mimeEncodeFieldAsMIMEMultipartDocument in
>>> com.livecode.library.mime and not in the TsNetLibUrl, so I
>>> guess that answers that question.
>>> 
>>> If I’m incorrect somehow, please let me know.
>>> 
>>> Thanks,
>>> 
>>> Rick
>>> 
 On Mar 1, 2021, at 7:09 PM, matthias rebbe via use-livecode 
  wrote:
 
 mimeEncodeFieldAsMIMEMultipartDocument
>>> 
>>> ___
>>> 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


___
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: Version 1.2 of the mail stack

2021-03-02 Thread Rick Harrison via use-livecode
Hi Matthias,

I managed to find mime.livecodescript.

What folder do I need to put it into on my macOS Catalina LC Server?

Thanks,

Rick

> On Mar 2, 2021, at 12:55 PM, matthias rebbe via use-livecode 
>  wrote:
> 
> I would copy the complete file mime.livecodescript to the server.
> The file can be found in the Extensions folder either in the app bundle 
> (macOS) or  the Livecode program folder under program files (Windows).
> 
> In your script  use 'start using" to use the library
> e.g.
> start using  "mime.livecodescript"
> 
> put "test" into the templatefield
> put mimeEncodeFieldAsMIMEMultipartDocument(the long id of the templatefield) 
> into tBody
> 
> 
> 
> 
> Regarding tsNet:
> I am at HostM and i am using LivecodeServer Business in my accounts.
> HostM has LivecodeServer Community installed by default for every account.
> But if a customer can proof the purchase/subscription of an Indy or Business 
> License, they even install the Indy or Business version of Livecode Server 
> for the that customer accounts.
> 
> In the past it was mandatory to run  tsInit   first in the Livecode Server 
> script to initialize tsNET.
> 
> 
> 
> Regards,
> Matthias
> 
> 
> 
> Matthias Rebbe
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
> 
>> Am 02.03.2021 um 17:56 schrieb Rick Harrison via use-livecode 
>> :
>> 
>> Hi Matthias,
>> 
>> Ok, I only see mimeEncodeFieldAsMIMEMultipartDocument in
>> com.livecode.library.mime and not in the TsNetLibUrl, so I
>> guess that answers that question.
>> 
>> If I’m incorrect somehow, please let me know.
>> 
>> Thanks,
>> 
>> Rick
>> 
>>> On Mar 1, 2021, at 7:09 PM, matthias rebbe via use-livecode 
>>>  wrote:
>>> 
>>> mimeEncodeFieldAsMIMEMultipartDocument
>> 
>> ___
>> 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: use-livecode Digest, Vol 210, Issue 2

2021-03-02 Thread Mark Clark via use-livecode

Hey Tom, the email I wrote about potential “integration" is almost five years 
old and things change. Primarily I think just a base set of S3 compatible (vs 
AWS hard coded) connectivity would be more than enough. It’s pretty trivial to 
use minio (or any compatible s3 object store) in conjunction with LC as is. The 
LC library doesn’t support multi-part and that’s a likely better thing to be 
looking at for their company vs. a tie in with a third party. The low hanging 
fruit is to allow connections to things other than amazon.

As you know, FOSS S3 compatible hosts can provide LC developers with all sorts 
of good things— temp urls, replacement for ftp, simple IAM workflows to provide 
registration keys without the overhead needed with a full LAMP stack. Just 
takes a little imagination, really. LC already has load stack from url so 
loading from minio/cloudian/scality et al would work quite well. 

I am on the digest version of this list  so apologies for delayed response--

Mark




> On Mar 2, 2021, at 11:00 AM, use-livecode-requ...@lists.runrev.com 
>  wrote:
> 
> I agree that it would be interesting to have minio directly inside LC via
> widgets,
> What advantage would there be to that vs updating the aws library to work?
> Interested to hear your thoughts.
___
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: Version 1.2 of the mail stack

2021-03-02 Thread matthias rebbe via use-livecode
I would copy the complete file mime.livecodescript to the server.
The file can be found in the Extensions folder either in the app bundle (macOS) 
or  the Livecode program folder under program files (Windows).

In your script  use 'start using" to use the library
e.g.
start using  "mime.livecodescript"

put "test" into the templatefield
put mimeEncodeFieldAsMIMEMultipartDocument(the long id of the templatefield) 
into tBody




Regarding tsNet:
I am at HostM and i am using LivecodeServer Business in my accounts.
HostM has LivecodeServer Community installed by default for every account.
But if a customer can proof the purchase/subscription of an Indy or Business 
License, they even install the Indy or Business version of Livecode Server for 
the that customer accounts.

In the past it was mandatory to run  tsInit   first in the Livecode Server 
script to initialize tsNET.



Regards,
Matthias



Matthias Rebbe
-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 02.03.2021 um 17:56 schrieb Rick Harrison via use-livecode 
> :
> 
> Hi Matthias,
> 
> Ok, I only see mimeEncodeFieldAsMIMEMultipartDocument in
> com.livecode.library.mime and not in the TsNetLibUrl, so I
> guess that answers that question.
> 
> If I’m incorrect somehow, please let me know.
> 
> Thanks,
> 
> Rick
> 
>> On Mar 1, 2021, at 7:09 PM, matthias rebbe via use-livecode 
>>  wrote:
>> 
>> mimeEncodeFieldAsMIMEMultipartDocument
> 
> ___
> 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: Version 1.2 of the mail stack

2021-03-02 Thread Rick Harrison via use-livecode
Hi Matthias,

Ok, I only see mimeEncodeFieldAsMIMEMultipartDocument in
com.livecode.library.mime and not in the TsNetLibUrl, so I
guess that answers that question.

If I’m incorrect somehow, please let me know.

Thanks,

Rick

> On Mar 1, 2021, at 7:09 PM, matthias rebbe via use-livecode 
>  wrote:
> 
> mimeEncodeFieldAsMIMEMultipartDocument

___
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: Version 1.2 of the mail stack

2021-03-02 Thread Rick Harrison via use-livecode
Hi Matthais,

It’s been so long since I have used the project browser
I forgot that one has to click on the number of lines
of code to see the actual code. LOL

Ok, so which one do I want? 

Rick
___
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: Version 1.2 of the mail stack

2021-03-02 Thread Rick Harrison via use-livecode
Hi Matthias,

Sorry, but I have never needed to mess with libraries before this.

Where do I get the complete Mime library script?

I tried looking in the Project Browser for version
1.2 of the mail stack but all I could see was
com.livecode.library.mime and tsNetLibUrl
for choices.  When I open either I get a blank
window and when I try to look for script in
the stack or card it shows me nothing.
 
Is there a LiveCode lesson on this anywhere?

Thanks,

Rick


> On Mar 1, 2021, at 7:09 PM, matthias rebbe via use-livecode 
>  wrote:
> 
> Hi Rick,
> 
> if i recall it correctly i used the templatefield for that in LC server.
> 
> So set the text of the templatefield and then use that in the 
> mimeEncodeFieldAsMIMEMultipartDocument.
> 
> e.g.
> put "test" into the templatefield
> put mimeEncodeFieldAsMIMEMultipartDocument(the long id of the templatefield) 
> into tBody
> 
> 
> LC Server does not include the Mime library, so you'll need to copy the 
> complete Mime library script to your web server and include it in your script.
> 
> It's late here and i am off for some sleep now. So do not wonder when i reply 
> later.
> 
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
> 


___
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: how do I get geoLocation on a Mac?

2021-03-02 Thread Kee Nethery via use-livecode
Paul, 

This is a great suggestion. I’m trying simulate the iOS geolocation while I 
develop on macOS. Yours is a great idea.

I have gotten the JavaScript to auto load the lat long when I hit the html page 
with the JavaScript on my Mac as a file using Safari.

And I’ve gotten the browser widget to load a page from the internet. Could not 
get browser widget to load from a file on my Mac without enabling an http 
server on my Mac.

Tried putting the JavaScript page on a remote server and hitting it and that 
did not work, presumably because the server is not https.

On Wednesday will put the page on an https enabled web site and see if I can 
get it to load in a browser widget. Will report back.

But if all else fails, the IP to lat long is going to be a good solution. Thanks

Kee Nethery

> On Mar 1, 2021, at 8:35 PM, Paul Hibbert via use-livecode 
>  wrote:
> 
> I’m no Javascript expert, so I can’t answer the question about the error, 
> but my best guess is that code needs to be run within a browser. 
> 
> However, considering that you need to be connected to the internet to access 
> your geolocation on desktop, if you sign up for a free API with 
> https://ipgeolocation.io (for unto 30K non commercial Requests Per Month), 
> then it’s pretty easy to parse the Lat/Long from the returned data with a 
> couple of lines of of simple code, e.g.
> 
>   put url(https://api.ipgeolocation.io/ipgeo?apiKey=) into tResult 
> -- Replace  with your unique key
> 
>   put item 12 of tResult && item 13 of tResult into tGeoLocation
> 
> The result = "latitude":"50.12345" "longitude":"-125.67890”
> 
> It’s not quite as accurate as GPS, but it’s close, plus you have the 
> advantage of lots more data returned should you need it and no messing with 
> Javascript.
> 
> Paul
> 
> 
> 
>> On 1Mar, 2021, at 10:34 AM, kee nethery via use-livecode 
>>  wrote:
>> 
>> How do I get latitude & longitude within a macOS LiveCode script?
>> 
>> ———
>> 
>> I know iOS has a way to tell you latitude & longitude. It appears that 
>> capability is not available on macOS.
>> 
>> I know that macOS browsers, with WiFi on and connected, can determine 
>> lat/long with a javascript command. At this URL:
>>https://www.w3schools.com/html/html5_geolocation.asp
>> I found this example:
>> 
>> 
>> var x = document.getElementById("demo");
>> function getLocation() {
>> if (navigator.geolocation) {
>>   navigator.geolocation.getCurrentPosition(showPosition);
>> } else {
>>   x.innerHTML = "Geolocation is not supported by this browser.";
>> }
>> }
>> 
>> function showPosition(position) {
>> x.innerHTML = "Latitude: " + position.coords.latitude + 
>> "
Longitude: " + position.coords.longitude; >> } >> >> >> >> I know that macOS can: >>do