Re: Chromebook apps?

2020-06-22 Thread Stephen MacLean via use-livecode
> On Jun 22, 2020, at 3:17 PM, Richard Gaskin via use-livecode 
>  wrote:
> 
> John McKenzie wrote:
> 
>> Could you not just deploy a Linux desktop Livecode app to a
>> Chromebook? ChromeOS is a Linux distribution, if admittedly a stripped
>> down one, after all.
> 
> Alas, while ChromeOS is based on the Linux kernel, everything above the 
> kernel is different (desktop manager, compositor, UI inputs, etc.).
> 
> And of course the current LC build for Linux is compiled for x86 processors.  
> Since Frazier left we haven't seen any further development of an ARM-based 
> compile of the LC Linux engine.
> 


Looks like ARM  just became a MUCH bigger issue!

___
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


Identifying Un-used functions and commands

2019-11-12 Thread Stephen MacLean via use-livecode
Hi All,

I’m wondering if anyone has a way or code to identify any un-used functions and 
commands in a set of stacks?

Best,
Steve MacLean

___
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


9.5 rc1 copy file lag

2019-07-26 Thread Stephen MacLean via use-livecode
Hi All,

Just downloaded the LC 9.5 RC1 (Business) 64 bit yesterday and am now seeing a 
lot of lagging or hanging when using revCopyFile that I haven’t seen in past 
releases. It’s really noticeable when I have this running in the background in 
the IDE, and doing something else in the foreground.

Once the current run is complete, I’ll try 9.05 RC1 as well. This wasn’t an 
issue with 9.02.

If you’ve seen this as well, please let me know.

Best,

Steve MacLean
___
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: DELETE url

2019-07-05 Thread Stephen MacLean via use-livecode
This works for me:

delete URL(tPostURL)


tPostURL is the URL you want to send the delete to. The URL can include an API 
call, authentication token, etc.

I do have LC Business, but don’t need to use tsNet for this specifically, 
although I do use it for some other things.

You can find all the commands, etc. for tsNet here:

https://www.techstrategies.com.au/tsnet-resources/ 
<https://www.techstrategies.com.au/tsnet-resources/>

as well as some sample stacks that I have found invaluable for seeing how it 
all works.

Best,
Steve MacLean


> On Jul 5, 2019, at 6:27 PM, Stephen MacLean via use-livecode 
>  wrote:
> 
> Hi J,
> 
> DELETE does work, it’s used in the WP library. 
> 
> I’m out right now, but will find the code and send you a sample when I get 
> back. 
> 
> Best,
> Steve MacLean
> 
>> On Jul 5, 2019, at 6:23 PM, J. Landman Gay via use-livecode 
>>  wrote:
>> 
>> The server lady wants it that way. I create signed AWS URLs that are secure 
>> and which access her APIs. So far we've only used POST, PUT, and GET. Now 
>> we've added a "log out" function and I'm supposed to send the URL with 
>> DELETE. She is floored that I can't do that:
>> 
>> "I can change it if you really don’t have DELETE, but I would find it 
>> surprising. If you do have it, I’d prefer to keep it as DELETE since it 
>> makes the most sense for the action."
>> 
>> Then she suggests using cURL but that won't work on mobile where we can't 
>> use shell.
>> 
>> I wouldn't know where to start with tsNetCustom(), but I'll investigate. 
>> Suggestions welcome, provided it works on mobile.
>> 
>>> On 7/5/19 3:30 PM, Dar Scott Consulting via use-livecode wrote:
>>> Testing DELETE is scary. Consider httpstat.us <http://httpstat.us/>, 
>>> httpbin.org <http://httpbin.org/> or others for safe testing.
>>> I haven't tested, but I'd think that 'delete URL 
>>> "http://www.example.com/oldthings.txt 
>>> <http://www.example.com/oldthings.txt>"' should work.
>>> You might need to pass along some auth:
>>> delete URL "http://badwolf:swordf...@www.example.com/secretthings.txt 
>>> <http://badwolf:swordf...@www.example.com/secretthings.txt>"
>>> If not, you can directly use TCP. It is as easy as a simple GET. It is as 
>>> hard as figuring out simple HTTP.
>>> Or consider tsNetCustom() and use "DELETE" as the request.
>>> Dar Scott
>>> darzLab
>>>> On Jul 5, 2019, at 1:55 PM, J. Landman Gay via use-livecode 
>>>>  wrote:
>>>> 
>>>> I need to send a DELETE to a server. I only know of PUT, GET, and POST 
>>>> options. Does tsNet support DELETE? If not, how would I do that?
>>>> 
>>>> -- 
>>>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>>>> HyperActive Software   | http://www.hyperactivesw.com
>> 
>> 
>> -- 
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software   | http://www.hyperactivesw.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
> 
> 
> 
> ___
> 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: DELETE url

2019-07-05 Thread Stephen MacLean via use-livecode
Hi J,

DELETE does work, it’s used in the WP library. 

I’m out right now, but will find the code and send you a sample when I get 
back. 

Best,
Steve MacLean

> On Jul 5, 2019, at 6:23 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> The server lady wants it that way. I create signed AWS URLs that are secure 
> and which access her APIs. So far we've only used POST, PUT, and GET. Now 
> we've added a "log out" function and I'm supposed to send the URL with 
> DELETE. She is floored that I can't do that:
> 
> "I can change it if you really don’t have DELETE, but I would find it 
> surprising. If you do have it, I’d prefer to keep it as DELETE since it makes 
> the most sense for the action."
> 
> Then she suggests using cURL but that won't work on mobile where we can't use 
> shell.
> 
> I wouldn't know where to start with tsNetCustom(), but I'll investigate. 
> Suggestions welcome, provided it works on mobile.
> 
>> On 7/5/19 3:30 PM, Dar Scott Consulting via use-livecode wrote:
>> Testing DELETE is scary. Consider httpstat.us , 
>> httpbin.org  or others for safe testing.
>> I haven't tested, but I'd think that 'delete URL 
>> "http://www.example.com/oldthings.txt 
>> "' should work.
>> You might need to pass along some auth:
>> delete URL "http://badwolf:swordf...@www.example.com/secretthings.txt 
>> "
>> If not, you can directly use TCP. It is as easy as a simple GET. It is as 
>> hard as figuring out simple HTTP.
>> Or consider tsNetCustom() and use "DELETE" as the request.
>> Dar Scott
>> darzLab
>>> On Jul 5, 2019, at 1:55 PM, J. Landman Gay via use-livecode 
>>>  wrote:
>>> 
>>> I need to send a DELETE to a server. I only know of PUT, GET, and POST 
>>> options. Does tsNet support DELETE? If not, how would I do that?
>>> 
>>> -- 
>>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>>> HyperActive Software   | http://www.hyperactivesw.com
> 
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.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



___
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: Resource header damaged?

2019-03-28 Thread Stephen MacLean via use-livecode
Or it could mean that LC has had a corrupted resource header in that file for a 
long time… DiskWarrior isn’t known for false positives.

I decided to run in on my laptop, which hadn’t crashed, and saw similar errors, 
so will file a bug report at some point.

Best,
Steve MacLean

> On Mar 28, 2019, at 6:08 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> If it's happened for every file for every version of livecode, I would 
> suspect a false positive. 
> 
> Bob S
> 
> 
>> On Mar 28, 2019, at 14:53 , Stephen MacLean via use-livecode 
>>  wrote:
>> 
>> HI All,
>> 
>> Had a crash yesterday that required me to run DiskWarrior to repair my 
>> directory.. out of habit, I also ran a check for damaged files.
>> 
>> I’m seeing that the file LiveCode-Commercial.rsrc as having  “resource 
>> header is damaged and cannot be repaired” with a location of:
>> "Macintosh HD/Applications/LiveCode Business 
>> 9.0.3.app/Contents/Tools/Runtime/Mac/MacOS X/x86-32” as well as
>> "Macintosh HD/Applications/LiveCode Business 9.0.3.app/Contents/Resources/“
>> 
>> These are for every version of LC I have installed, going back to 8.1.8.
>> 
>> I’m wondering if anyone else has seen this. I can report it if I’m not the 
>> only one.
>> 
>> Best,
>> 
>> Steve MacLean
> 
> ___
> 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

Resource header damaged?

2019-03-28 Thread Stephen MacLean via use-livecode
HI All,

Had a crash yesterday that required me to run DiskWarrior to repair my 
directory.. out of habit, I also ran a check for damaged files.

I’m seeing that the file LiveCode-Commercial.rsrc as having  “resource header 
is damaged and cannot be repaired” with a location of:
"Macintosh HD/Applications/LiveCode Business 
9.0.3.app/Contents/Tools/Runtime/Mac/MacOS X/x86-32” as well as
"Macintosh HD/Applications/LiveCode Business 9.0.3.app/Contents/Resources/“

These are for every version of LC I have installed, going back to 8.1.8.

I’m wondering if anyone else has seen this. I can report it if I’m not the only 
one.

Best,

Steve MacLean



___
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: Displaying or identifying emoji

2019-01-23 Thread Stephen MacLean via use-livecode
In my testing so far, word works while trueWord doesn’t, although that testing 
is still preliminary...

In my case, I need to strip them out. Single codepoint ones like the smiley are 
easy, they are one codepoint and 1 word. The ones, like red haired man, are 
tougher because they are multple codeponts. However, they are still 1 word.

I’ve built a sample library stack that contains all the emoji’s, their 
codepoints and some routines that I’m using to work through this all. I hope to 
have my testing done in the next day or two and will post for anyone who wants 
to play with it.

Best,

Steve MacLean

> On Jan 23, 2019, at 9:59 AM, Ralph DiMola via use-livecode 
>  wrote:
> 
> "Also, depending on the emoji, it may be 1 codepoint or many. Use the keyword 
> “word” when finding, etc."
> 
> Word or "true word"? Does it matter?
> 
> 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 Stephen MacLean via use-livecode
> Sent: Wednesday, January 23, 2019 9:15 AM
> To: How to use LiveCode
> Cc: Stephen MacLean
> Subject: Re: Displaying or identifying emoji
> 
> Hi David,
> 
> Looks like you are running into some of the same issues I had when learning 
> to work with them…
> 
> You say you are importing them? From where? A text file or DB?
> 
> Make sure that the encoding is set to UTF-8 or higher when you import. Next, 
> you need to textDecode() them, again making sure that encoding matches.
> 
> One MAJOR caveat that I ran into with using mySQL. After opening the 
> connection, you need to add the following code to fore the connection to 
> unicode:
> 
> ## Set utf8mb4
> 
> revExecuteSQL tDatabaseID, "SET NAMES 'utf8mb4'"
> 
> 
> Or whatever your encoding is on that table. Otherwise it will default to 
> ascii and you will get those characters.
> 
> Also, depending on the emoji, it may be 1 codepoint or many. Use the keyword 
> “word” when finding, etc.
> 
> Hope this helps!
> 
> Best,
> 
> Steve MacLean
> 
>> On Jan 23, 2019, at 7:34 AM, David V Glasgow via use-livecode 
>>  wrote:
>> 
>> Hello folks,
>> 
>> I am working on imported text messages from various sources, and which have 
>> been through various (unknown) processes/displays before I get them.  Some 
>> retain emoji intact, but others render them as an odd series of characters 
>> (presumably having been substituted when stored in a non-unicode 
>> environment):
>> 
>>  582 hexman555 (04/17/15 11:13:54 PM): I'll be here 😊❤️
>>  600 hexman555 (04/17/15 11:32:15 PM): Me too ❤️
>>  615 hexman555 (04/17/15 11:49:18 PM): Thank you ❤️💋
>>  625 hexman555 (04/17/15 11:52:29 PM): ❤️❤️❤️
>> 
>> I would like to know which emoji were being used, either by displaying them 
>> in the field or substituting "‚ù§Ô∏è” etc with parenthetic text describing 
>> the emoji.  I have tried to break emojis down, but can’t find an app that 
>> doesn’t display them - or rather mangles them in this way.  Similarly, I 
>> have looked at the ascii and hex of the component characters of the 
>> gobbledegook, but can’t see a pattern.
>> 
>> Any suggestions?
>> 
>> 
>> Best Wishes,
>> David Glasgow
>> 
>> 
>> <http://www.i-psych.co.uk/> <https://twitter.com/iPsychApps>
>> 
>> <https://twitter.com/iPsychApps> <http://uk.linkedin.com/in/davidvglasgow>
>> <http://uk.linkedin.com/in/davidvglasgow>
>> ___
>> 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: Displaying or identifying emoji

2019-01-23 Thread Stephen MacLean via use-livecode
Hi David,

Looks like you are running into some of the same issues I had when learning to 
work with them…

You say you are importing them? From where? A text file or DB?

Make sure that the encoding is set to UTF-8 or higher when you import. Next, 
you need to textDecode() them, again making sure that encoding matches.

One MAJOR caveat that I ran into with using mySQL. After opening the 
connection, you need to add the following code to fore the connection to 
unicode:

## Set utf8mb4

revExecuteSQL tDatabaseID, "SET NAMES 'utf8mb4'"


Or whatever your encoding is on that table. Otherwise it will default to ascii 
and you will get those characters.

Also, depending on the emoji, it may be 1 codepoint or many. Use the keyword 
“word” when finding, etc.

Hope this helps!

Best,

Steve MacLean

> On Jan 23, 2019, at 7:34 AM, David V Glasgow via use-livecode 
>  wrote:
> 
> Hello folks,
> 
> I am working on imported text messages from various sources, and which have 
> been through various (unknown) processes/displays before I get them.  Some 
> retain emoji intact, but others render them as an odd series of characters 
> (presumably having been substituted when stored in a non-unicode environment):
> 
>   582 hexman555 (04/17/15 11:13:54 PM): I'll be here 😊❤️
>   600 hexman555 (04/17/15 11:32:15 PM): Me too ❤️
>   615 hexman555 (04/17/15 11:49:18 PM): Thank you ❤️💋
>   625 hexman555 (04/17/15 11:52:29 PM): ❤️❤️❤️
> 
> I would like to know which emoji were being used, either by displaying them 
> in the field or substituting "‚ù§Ô∏è” etc with parenthetic text describing 
> the emoji.  I have tried to break emojis down, but can’t find an app that 
> doesn’t display them - or rather mangles them in this way.  Similarly, I have 
> looked at the ascii and hex of the component characters of the gobbledegook, 
> but can’t see a pattern.
> 
> Any suggestions?
> 
> 
> Best Wishes,
> David Glasgow
> 
> 
>  
> 
>  
> 
> ___
> 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: How to remove emoji's from unicode string

2019-01-13 Thread Stephen MacLean via use-livecode
Hi Kee,

codepointOffset() doesn’t seem to work as expected, at least for me on my data, 
although I’m not sure why. The results are way different. I had thought it 
would be as simple as using that, but as per usual, nothing is!

Best,

Steve MacLean

> On Jan 13, 2019, at 6:51 PM, Kee Nethery via use-livecode 
>  wrote:
> 
> On my phone so verify this.
> Shouldn’t you be using codepointoffset(),not offset()?
> 
> Kee Nethery
> 
>> On Jan 13, 2019, at 1:34 PM, Richmond via use-livecode 
>>  wrote:
>> 
>> Cop a look at this:
>> 
>> *http://forums.livecode.com/viewtopic.php?f=7=32030*
>> 
>>> On 13.01.19 22:17, Stephen MacLean via use-livecode wrote:
>>> Hi All,
>>> 
>>> The recent conversations on using offset() with Unicode strings was very 
>>> enlightening, thanks to all that took part!.
>>> 
>>> I have data stored in UTF8mb4. I use textDecode after loading it from the 
>>> DB to put it into a format that LC understands. I then use offset() to find 
>>> certain tags, text, etc. to work with. However, if there are emoji in that 
>>> string, the offset() function hard crashes with a out of range error.
>>> 
>>> Due to the troubles offset(), I’m looking for a way to remove the emojis 
>>> before I have to use the offset function.
>>> 
>>> Short of compiling a list of emoji and the decimal equivalent, does anyone 
>>> have a way to do this in LC?
>>> 
>>> My offset code has been rock solid, except for these rare instances were 
>>> there are emoji in the text and I am not really looking to change it if I 
>>> don’t have to, preferring to just remove the emoji if possible.
>>> 
>>> TIA,
>>> 
>>> Steve MacLean
>>> 
>>> ___
>>> 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: How to remove emoji's from unicode string

2019-01-13 Thread Stephen MacLean via use-livecode
Hi Richmond,

Thanks for posting this!

There are multiple ranges for emojis, as more were added in each version on 
Unicode.

Here is the list for the latest version of unicode 12.0

https://www.unicode.org/Public/emoji/12 ... i-data.txt 
<https://www.unicode.org/Public/emoji/12.0/emoji-data.txt>

I think that between your stripper and updated unicode map, it should be able 
to find and strip them all?


From my Forum reply.

> On Jan 13, 2019, at 4:34 PM, Richmond via use-livecode 
>  wrote:
> 
> Cop a look at this:
> 
> *http://forums.livecode.com/viewtopic.php?f=7=32030*
> 
> On 13.01.19 22:17, Stephen MacLean via use-livecode wrote:
>> Hi All,
>> 
>> The recent conversations on using offset() with Unicode strings was very 
>> enlightening, thanks to all that took part!.
>> 
>> I have data stored in UTF8mb4. I use textDecode after loading it from the DB 
>> to put it into a format that LC understands. I then use offset() to find 
>> certain tags, text, etc. to work with. However, if there are emoji in that 
>> string, the offset() function hard crashes with a out of range error.
>> 
>> Due to the troubles offset(), I’m looking for a way to remove the emojis 
>> before I have to use the offset function.
>> 
>> Short of compiling a list of emoji and the decimal equivalent, does anyone 
>> have a way to do this in LC?
>> 
>> My offset code has been rock solid, except for these rare instances were 
>> there are emoji in the text and I am not really looking to change it if I 
>> don’t have to, preferring to just remove the emoji if possible.
>> 
>> TIA,
>> 
>> Steve MacLean
>> 
>> ___
>> 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

How to remove emoji's from unicode string

2019-01-13 Thread Stephen MacLean via use-livecode
Hi All,

The recent conversations on using offset() with Unicode strings was very 
enlightening, thanks to all that took part!.

I have data stored in UTF8mb4. I use textDecode after loading it from the DB to 
put it into a format that LC understands. I then use offset() to find certain 
tags, text, etc. to work with. However, if there are emoji in that string, the 
offset() function hard crashes with a out of range error.

Due to the troubles offset(), I’m looking for a way to remove the emojis before 
I have to use the offset function.

Short of compiling a list of emoji and the decimal equivalent, does anyone have 
a way to do this in LC?

My offset code has been rock solid, except for these rare instances were there 
are emoji in the text and I am not really looking to change it if I don’t have 
to, preferring to just remove the emoji if possible.

TIA,

Steve MacLean

___
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 check to see if an environment variable exists?

2018-11-24 Thread Stephen MacLean via use-livecode
Thanks all!

I am basically doing what Jacqueline does and check to see if empty and then 
verify against a list of switches.

It does seem strange that we can’t check for the existence of a variable, but 
this works.

Thanks,

Steve MacLean

> On Nov 24, 2018, at 11:35 AM, J. Landman Gay via use-livecode 
>  wrote:
> 
>> How would I test to see if the $1 variable exists?
> 
> I don't check for existence, I only check whether it's empty.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On November 24, 2018 8:04:50 AM bob--- via use-livecode 
>  wrote:
> 
>> $# tells you how many parameters there are for a script. Perhaps if $# > 0 
>> then... instead might work (I’ve not tried that). You might find using 
>> environment() potentially helps as well. The Dictionary has the details. If 
>> neither of those options work let me know. I have another way you could 
>> tackle the issue.
>> 
>> - Bob Hall
>> 
>>> On Nov 23, 2018, at 5:27 PM, Stephen MacLean via use-livecode 
>>>  wrote:
>>> 
>>> However, the exists($1) never returns true, even when it should. Which 
>>> leads to to believe that’s not what I want to use.
>>> 
>>> How would I test to see if the $1 variable exists?
>> 
>> ___
>> 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

How do I check to see if an environment variable exists?

2018-11-23 Thread Stephen MacLean via use-livecode
Hi All,

Looking to see how I check to see if my standalone was launch via command line 
with a parameter?

I know that when it’s launched via command line with a parameter in windows, I 
will see a $0 (Name of executable) and $1 for the parameter.

Since this is a dual launch able app, double click and command line with 
parameter I have the following in the main stack:

on openStack

if exists($1) then

put $1 into pState

put "prod" into pMode

runBuildAndPush pState, pMode

end if

end openStack


However, the exists($1) never returns true, even when it should. Which leads to 
to believe that’s not what I want to use.

How would I test to see if the $1 variable exists?

TIA,

Steve MacLean



___
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: SSL with HTTPD Library?

2018-11-01 Thread Stephen MacLean via use-livecode
Hi Monte,

Not sure on this, or if it was implemented… I was the submitter on 16871.

I agree with your enhancement to the command, pretty similar to other 
implementations I’ve seen.

Best,

Steve MacLean

> On Nov 1, 2018, at 8:02 PM, Monte Goulding via use-livecode 
>  wrote:
> 
> As it’s not documented I’m not 100% sure it works or anyone has tried it but 
> it seems at some point `accept secure connections` was implemented.
> 
> The syntax declaration for `accept` should be:
> 
> accept [{ secure | datagram }] connections on port  with message 
>  [{ with | without } verification]
> 
> I can see for sure there is a bug meaning you can’t turn on verification 
> using `with verification`.
> 
> Really I think the command would need further enhancement to add the optional:
> 
> with certificate  and private key 
> 
> That would presume the rest of the certificate chain is in the 
> sslCertificates I think.
> 
> See reports:
> https://quality.livecode.com/show_bug.cgi?id=13410 
> 
> https://quality.livecode.com/show_bug.cgi?id=16871 
> 
> https://quality.livecode.com/show_bug.cgi?id=13681
> 
> Cheers
> 
> Monte
> 
>> On 2 Nov 2018, at 8:38 am, Richard Gaskin via use-livecode 
>>  wrote:
>> 
>> Stephen MacLean wrote:
>> 
>>> I’m looking to use the HTTPD library with an SSL Cert if possible.
>>> 
>>> Is it possible?
>> 
>> AFAIK all of the HTTPd libs for LC/MC do not handle HTTPS.  It should be 
>> possible to fork one of them to add that, but the effort would be 
>> non-trivial.
>> 
>> What is the usage scenario you're aiming for?  Perhaps could be solved 
>> through some other means.
>> 
>> -- 
>> Richard Gaskin
>> Fourth World Systems
>> Software Design and Development for the Desktop, Mobile, and the Web
>> 
>> ambassa...@fourthworld.comhttp://www.FourthWorld.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
> 
> ___
> 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: SSL with HTTPD Library?

2018-11-01 Thread Stephen MacLean via use-livecode

> On Nov 1, 2018, at 5:38 PM, Richard Gaskin via use-livecode 
>  wrote:
> 
> Stephen MacLean wrote:
> 
> > I’m looking to use the HTTPD library with an SSL Cert if possible.
> >
> > Is it possible?
> 
> AFAIK all of the HTTPd libs for LC/MC do not handle HTTPS.  It should be 
> possible to fork one of them to add that, but the effort would be non-trivial.
> 
> What is the usage scenario you're aiming for?  Perhaps could be solved 
> through some other means.
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.com


Hi Richard,

Thanks for the reply. Specifically I was referring to the HTTPD Library 
included with LC 9. And yes, it doesn’t look like it supports SSL, as Monte 
points out in a later email (I’m the submitter on 16871). It’s a shame, since 
it’s really light, FAST, and straight forward to implement.

My use case is a self-service ad sales and serving system. It would be strictly 
for handling JS calls and pointing to the ad image that’s served from a real 
web server, while recording the impression and click through. I need, as would 
others, this to be handled via SSL to keep browser security from yelling.

I realize that there are a number of other technologies I could use, but have 
been enjoying building so much in LC, was hoping to keep it all in the family. 
Yes, I could set up an LC server instance, i do have a business license, but am 
disappointed that it doesn’t work with IIS / I need to run Apache under 
Windows, or use it on Linux. Will I do run several linux (Unbuntu) instances, 
I’d prefer not to add another VM.

I would hope that these kinds of server uses are looked at really hard by LC. 
Direct server tech such as this is such natural fit for LC. LC server, can do 
it, but also suffers, from what I’ve read in my research, a speed penalty from 
CGI implementation vs direct sockets, etc.

Thanks again for the reply, appreciate all you do for the LC community. If you 
have any suggestions, I would appreciate hearing them.

Best,

Steve MacLean




___
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

SSL with HTTPD Library?

2018-10-30 Thread Stephen MacLean via use-livecode
Hi All,

I’m looking to use the HTTPD library with an SSL Cert if possible.

Is it possible?

TIA,

Steve MacLean

___
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: regex url validator?

2018-10-23 Thread Stephen MacLean via use-livecode
Hi Bob,

This function does more than what Tom was asking for, but included it so he 
could see the entire function. No, rsIsValidEmail_LC isn’t built into LiveCode, 
it’s part of the rsIsValid suite.

Best,

Steve

> On Oct 23, 2018, at 10:54 AM, Bob Sneidar via use-livecode 
>  wrote:
> 
> This looks like it is dependent on other functions. Are these built into 
> Livecode??
> 
> Bob S
> 
> 
>> On Oct 23, 2018, at 06:26 , Stephen MacLean via use-livecode 
>>  wrote:
>> 
>> Hi Tom,
>> 
>> Don’t know if you found a solution yet, but this is from the rsIsValid suite 
>> I put together a few years back.
>> 
>> http://forums.livecode.com/viewtopic.php?f=16=26653=138698#p138698 
>> <http://forums.livecode.com/viewtopic.php?f=16=26653=138698#p138698>. 
>> https://github.com/renegadesteve/rsIsValid 
>> <https://github.com/renegadesteve/rsIsValid>
>> 
>> 
>> Below is the LCS version:
>> function rsIsValidURL pURL
>> 
>> put pURL into tCC
>> 
>> // get scheme
>> 
>> put "^(?[a-z][a-z0-9+\-.]*):" into tSchemeRegex
>> 
>> get matchText(tCC, tSchemeRegex,tScheme)
>> 
>> // check scheme for http, https, ftp, ftps, mailto, nntp, news, or file
>> 
>> if it <> true then return false
>> 
>> if tScheme = "mailto" then
>> 
>> //get the email address from the URL and then validate it
>> 
>> delete char 1 to 7 of tCC
>> 
>> return rsIsValidEmail_LC(tCC)
>> 
>> else
>> 
>> // setup the regex pattern
>> 
>> put 
>> "^(?:http://|https://|ftp://|ftps://|nntp://|news://)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{}0-9]-*)*[a-z\x{00a1}-\x{}0-9]+)(?:\.(?:[a-z\x{00a1}-\x{}0-9]-*)*[a-z\x{00a1}-\x{}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{}]{2,}))\.?)(?::\d{2,5})?(?:[/?#]\S*)?$"
>>  into tURLRegex
>> 
>> // run filter against regex pattern and set result to true if it matches.
>> 
>> filter tCC with regex pattern tURLRegex into tMatch
>> 
>> if tMatch <> empty then
>> 
>> return true
>> 
>> else
>> 
>> return false
>> 
>> end if
>> 
>> end if
>> 
>> end rsIsValidURL
>> 
>> 
>> Best,
>> 
>> Steve MacLean
>> 
>>> On Oct 22, 2018, at 10:07 PM, Tom Glod via use-livecode 
>>>  wrote:
>>> 
>>> Hi peeps,
>>> 
>>> I'm trying to use regex to validate a list of URLs
>>> 
>>> I've tried 4 or 5 different "regular" expressions that supposedly work
>>> . but LC does not give me anything back.  None of them work,
>>> 
>>> Like for example ... this one.
>>> 
>>> ^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$
>>> 
>>> or this one
>>> 
>>> /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/
>>> 
>>> or this one just to make sure
>>> 
>>> (https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)
>>> 
>>> Does anyone know how to get these or others to work in LC?
>>> 
>>> Thanks,
>>> 
>>> Tom
>>> ___
>>> 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: regex url validator?

2018-10-23 Thread Stephen MacLean via use-livecode
Hi Tom,

Don’t know if you found a solution yet, but this is from the rsIsValid suite I 
put together a few years back.

http://forums.livecode.com/viewtopic.php?f=16=26653=138698#p138698 
. 
https://github.com/renegadesteve/rsIsValid 



Below is the LCS version:
function rsIsValidURL pURL

put pURL into tCC

// get scheme

put "^(?[a-z][a-z0-9+\-.]*):" into tSchemeRegex

get matchText(tCC, tSchemeRegex,tScheme)

// check scheme for http, https, ftp, ftps, mailto, nntp, news, or file

if it <> true then return false

if tScheme = "mailto" then

//get the email address from the URL and then validate it

delete char 1 to 7 of tCC

return rsIsValidEmail_LC(tCC)

else

// setup the regex pattern

put 
"^(?:http://|https://|ftp://|ftps://|nntp://|news://)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{}0-9]-*)*[a-z\x{00a1}-\x{}0-9]+)(?:\.(?:[a-z\x{00a1}-\x{}0-9]-*)*[a-z\x{00a1}-\x{}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{}]{2,}))\.?)(?::\d{2,5})?(?:[/?#]\S*)?$"
 into tURLRegex

// run filter against regex pattern and set result to true if it matches.

filter tCC with regex pattern tURLRegex into tMatch

if tMatch <> empty then

return true

else

return false

end if

end if

end rsIsValidURL


Best,

Steve MacLean

> On Oct 22, 2018, at 10:07 PM, Tom Glod via use-livecode 
>  wrote:
> 
> Hi peeps,
> 
> I'm trying to use regex to validate a list of URLs
> 
> I've tried 4 or 5 different "regular" expressions that supposedly work
> . but LC does not give me anything back.  None of them work,
> 
> Like for example ... this one.
> 
> ^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$
> 
> or this one
> 
> /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/
> 
> or this one just to make sure
> 
> (https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)
> 
> Does anyone know how to get these or others to work in LC?
> 
> Thanks,
> 
> Tom
> ___
> 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: Will it ever be possible place controls over browser widget?

2018-10-04 Thread Stephen MacLean via use-livecode
If I remember correctly this is supposed to be “change” at some point with 
infinite LC. 

In the mean time, you could overlay another html control over it and use it as 
a button. 

At least you used to be able to do that.  

Best,

Steve

> On Oct 4, 2018, at 2:26 PM, Tom Glod via use-livecode 
>  wrote:
> 
> oh yeah i know that right now thats the casei'm asking if anyone knows
> if thats a temporary or permanent situation.
> 
> On Thu, Oct 4, 2018 at 2:08 PM Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> I went through that a while back. I was trying to create a web based Kiosk
>> app, that a hot-click could cancel, so we could get back to the desktop. I
>> never got it to work. Once the browser object had control, nothing else
>> would respond.
>> 
>> Bob S
>> 
>> 
>>> On Oct 4, 2018, at 11:04 , Tom Glod via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hi,
>>> 
>>> Ehh.Does anyone know if it will ever be possible to place controls on
>>> layers above a browser widget?
>>> 
>>> Thanks,
>>> 
>>> Tom
>> 
>> 
>> ___
>> 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: Searching for a word when it's more than one word

2018-09-01 Thread Stephen MacLean via use-livecode
Thankfully, in my case, I do know what at least the state is:)

> On Sep 1, 2018, at 11:55 AM, Mark Wieder via use-livecode 
>  wrote:
> 
>> On 09/01/2018 08:39 AM, J. Landman Gay via use-livecode wrote:
>> There is a town in Texas called West, made infamous a few years ago by a 
>> giant explosion. I don't think you can make assumptions about names of 
>> places.
> 
> And thus the distinction between West Texas and West, Texas.
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.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



___
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: Searching for a word when it's more than one word

2018-09-01 Thread Stephen MacLean via use-livecode
Wow, this is awesome, thank you all!!

Sorry, on the road taking my daughter to college, would love to try some of 
this out. 

One thing to keep in mind is that as that I’m checking for names against the 
town list, I may not know what town I’m actually looking for. Usually i do, but 
not always. 

Therefore i’ve been counting how many of each name I’ve come across and do some 
calculations at the end to make a best guess. 

Really appreciate the responses!!

Thank you,

Steve

> On Sep 1, 2018, at 7:53 AM, Richmond Mathewson via use-livecode 
>  wrote:
> 
> 
> 
>> On 1/9/2018 2:50 pm, Mark Waddingham via use-livecode wrote:
>>> On 2018-09-01 13:15, Richmond Mathewson via use-livecode wrote:
>>> I've already shovelled Ruyton of the Eleven Towns quite effectively:
>>> 
>>> https://www.dropbox.com/s/n7r7u0c2m9ny3eb/Text%20analyzer%20X.livecode.zip?dl=0
>>>  
>>> 
>>> No tokenising, in fact very basic stuff indeed.
>>> 
>>> Not wishing to bang on about over-complcating things . . . . .
>> 
>> There is actually a 'correct' more shovelistic approach (at least I *think* 
>> this is correct):
>> 
>> -- Ensure all punctuation is surrounded by space
>> repeat for each char tPuncChar in ",.';:()[]{}<>!@£$%^&*-_+=~`?/\|#€" & quote
>>  replace tPuncChar with space & tPuncChar & space in tText
>> end repeat
> 
> Thats a "point" (pun intended) as I just fell foul of a full stop.
>> 
>> -- Ensure all whitespace is space
>> replace return with space in tText
>> replace tab with space in tText
>> 
>> -- Ensure there is never two spaces next to each other in tText
>> repeat while tText contains "  "
>>  replace "  " with " " in tText
>> end repeat
>> 
>> -- Ensure there is only ever one space between words in phrases
>> repeat while tPhrases contains "  "
>>  replace "  " with " " in tPhrases
>> end repeat
>> 
>> -- We can now use an itemDelimiter of space
>> set the itemDelimiter to space
>> 
>> -- Sort the phrases by descending word length.
>> sort lines of tPhrases descending numeric by the number of items in each
>> 
>> -- Now check for, and remove each phrase from the source text in turn
>> set the wholeMatches to true
>> repeat for each line tPhrase in tPhrases
>>  -- If the phrase is not present then skip to the next
>>  if itemOffset(tPhrase, tText) is 0 then
>>next repeat
>>  end if
>> 
>>  -- Accumulate the phrase on the output list
>>  put tPhrase & return after tFoundPhrases
>> 
>>  -- Remove the phrase from the input text (we assume here that * does not 
>> appear in any phrase)
>>  replace tPhrase with "*" in tText
>> end repeat
>> 
>> Warmest Regards,
>> 
>> Mark.
>> 
>> P.S. The above will be reasonable quick for small sets of phrases / small 
>> source texts - but I think as the size of either increases it will get very 
>> slow, very quickly!
>> 
> 
> 
> ___
> 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

Searching for a word when it's more than one word

2018-08-31 Thread Stephen MacLean via use-livecode
Hi All,

First, followed Keith Clarke’s thread and got a lot out of it, thank you all. 
That’s gone into my code snippets!

Now I know, the title is not technically true, if it’s 2 words, they are 
distinct and different. Maybe it’s because I’ve been banging my head against 
this and some other things too long and need to step back, but I’m having 
issues getting this all to work reliably.

I’m searching for town names in various text from a list of towns . Most names 
are one word, easy to find and count. Some names are 2 or 3 words, like East 
Hartford or West Palm Beach. Those go against distinct towns like Hartford and 
Palm Beach. Others have their names inside of other town names like Colchester 
and Chester.

"is among the words of” or "is among the trueWords of” works great to find 
single words, but only works on single words and doesn’t consider “Chester’s” 
to be ”Chester”, it isn't.

“is in” works great for finding multiple words like “East Hartford” and "West 
Palm Beach", finds “Chester” in “Chester’s” but also finds “chester” in 
“Colchester”.

At this point, I’ve been using different methods for single word towns vs 
multi-word towns and while generally effective, trying to accommodate for these 
and other oddities has made it a complete mess of code.

If someone has done something similar, or can point me in the right direction, 
it would be greatly appreciated.

TIA,

Steve MacLean





___
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: LC 9 and Memory

2018-08-26 Thread Stephen MacLean via use-livecode

> On Aug 26, 2018, at 8:14 PM, Tom Glod via use-livecode 
>  wrote:
> 
> just wondering whats the last version in which it didn't do this?
> 

If this was to me, I wouldn’t know… this project was created in LC 9.

Best,

Steve



___
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: LC 9 and Memory

2018-08-26 Thread Stephen MacLean via use-livecode
Hi Mark,

Here is one from when the app hit the half way point in it’s processing run:

Process: LiveCode-Business [799]
Path:/Applications/LiveCode Business 9.0.1 (rc 
2).app/Contents/MacOS/LiveCode-Business
Load Address:0x10d387000
Identifier:  com.runrev.livecode
Version: 9.0.1.15101 [RC 2] (9.0.1.15101 [RC 2])
Code Type:   X86-64
Parent Process:  ??? [1]

Date/Time:   2018-08-26 01:24:06.956 -0400
Launch Time: 2018-08-25 22:42:23.095 -0400
OS Version:  Mac OS X 10.12.6 (16G1510)
Report Version:  7
Analysis Tool:   /Applications/Xcode.app/Contents/Developer/usr/bin/heap
Analysis Tool Version:  Xcode 9.2 (9C40b)


Process 799: 6 zones
Zone DefaultMallocZone_0x10ee3a000: Overall size: 149641216KB; 520214585 nodes 
malloced for 28100061KB (18% of capacity); largest unused: 
[0x6003c9060040-1664KB]
Zone DefaultPurgeableMallocZone_0x11264e000: Overall size: 49836KB; 75 nodes 
malloced for 49828KB (99% of capacity); largest unused: [0x11daad000-11352KB]
Zone GFXMallocZone_0x10e5d5000: Overall size: 10240KB; 46 nodes malloced for 
8KB (0% of capacity); largest unused: [0x7fd853001400-8187KB]
Zone MallocHelperZone_0x10e4f: Overall size: 2976716KB; 508527 nodes 
malloced for 1998382KB (67% of capacity); largest unused: [0x119aa3000-12876KB]
Zone QuartzCore_0x111cac000: Overall size: 20480KB; 4 nodes malloced for 5KB 
(0% of capacity); largest unused: [0x7fd85180-8192KB]
Zone x-alloc_0x7fd84b028000: Overall size: 20KB; 5 nodes malloced for 1KB (5% 
of capacity); largest unused: [0x111cde000-8KB]
All zones: 520723242 nodes malloced - 30148282KB

I’d love to send you that one from near the end… LC was taking up almost 59GB 
of memory, memory pressure was insane, over 30 GB of compressed memory, 15GB 
swap file, finder having me force quit the few apps I had open. Tried to run 
heap, but after 3 hours it caused a kernel panic and the computer rebooted.


I can send you the full file if needed. Any help is appreciated.

Thanks,

Steve MacLean

> On Aug 13, 2018, at 2:07 PM, Mark Waddingham via use-livecode 
>  wrote:
> 
> On 2018-08-13 20:01, Stephen MacLean via use-livecode wrote:
>> Hi Mark,
>> Yes, doing quite a bit, which LC handles just fine:) Except for these
>> with big queries;) I do want to mention that I call plenty of
>> functions, so it’s not a real tight loop, just a loop with a lot going
>> on.
>> Ok, will do the next time I run one of these… These big batches take
>> about 5 hours to run.
> 
> From what you said in your other message this could well be a memory-leak...
> 
> However, the other potential cause is what's called 'heap-fragmentation'. 
> Whilst memory is being freed correctly, sometimes certain use patterns can 
> cause the C heap to consist of 'mostly free space', but having no contiguous 
> block large enough to allocate some of the blocks of memory you are using - 
> so the heap gets extended. When you do free a 'big block' it gets used up by 
> lots of small blocks.
> 
> Basically, the heap becomes like a block of swiss-cheese - you can fit small 
> things in the holes, but nothing big.
> 
> The 'heap' report will help determine what's going on there (you don't need 
> to run it until you get to the exhaustion point - just for a while until you 
> see the gradually continual rise).
> 
> By looking at the report it is possible to tell the actual % of memory in use 
> in the heap overall.
> 
> Is there any way to split up the processing of a single batch into pieces, 
> each run in its own process (sequentially?) - that approach actually gives 
> you two things - (1) a fix to the exhaustion problem you are having and (2) 
> the ability to recover most of the batch if one piece fails.
> 
> Warmest Regards,
> 
> Mark.
> 
> -- 
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
> 
> ___
> 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: Database data & emoji's

2018-08-14 Thread Stephen MacLean via use-livecode
Unfortunately, this looks to be an issue with the revDatabaseColumnNamed() not 
getting the proper data, even when using a variable in the command to get 
binary data:

put revDatabaseColumnNamed(sRecSet,"tw_full_text","test”) <- should get either 
text or binary data


with
put test into fld "cleaned_tw_content" of cd "twCleaner"


or
put textDecode(test) into fld "cleaned_tw_content" of cd "twCleaner"


doesn’t work.

put "#DSum  ✌️@David_summers12Y" into test

put test into fld "cleaned_tw_content" of cd "twCleaner"


Does.

Any other insight, ideas?

TIA.


> On Aug 14, 2018, at 10:07 PM, Stephen MacLean via use-livecode 
>  wrote:
> 
> Hi Tore,
> 
> Thanks, but I’ve already looked at and tried those.
> 
> Even putting the data directly from the RecordSet to the field just results 
> in question marks “?” where the emoji should be:
> 
> put textDecode(revDatabaseColumnNamed(sRecSet,"tw_full_text")) into fld 
> "cleaned_tw_content" of cd  “twCleaner"
> 
> The table and field in the table are utf8mb4 encoded to allow the storing of 
> emoji and other UTF data.
> 
> My connection in Navicat show it to be UTF-8 as well, and I can see the emoji 
> in the results. However, I don’t see an option to set this in the 
> revOpenDatabase(), so I take it that LC does it automatically…
> 
> Any other ideas appreciated.
> 
> TIA,
> 
> Steve MacLean
> 
> 
>> On Aug 14, 2018, at 6:24 PM, Tore Nilsen via use-livecode 
>>  wrote:
>> 
>> You should look up textEncode and textDecode in the dictionary. I think they 
>> may prove useful.
>> 
>> Best regards
>> Tore Nilsen
>> 
>> ---
>> This mail contains no viruses or bacteria as it is electronically produced 
>> and untouched by human hands. Once printed it may or may not contain various 
>> microorganisms that can cause diseases. Print and hand out at own risk. 
>> Unsolicited distribution of this mail is prohibited.
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> 15. aug. 2018 kl. 00:18 skrev Stephen MacLean via use-livecode 
>>> :
>>> 
>>> Hi All,
>>> 
>>> So I have data (text) stored in a mySQL DB that is set for UTF8 and it 
>>> stores unicode and emoji characters just fine. 
>>> 
>>> My problem is that when I pull a field from the record set and put it into 
>>> a LC field, I don’t get the unicode or emoji, just the the usual strange 
>>> characters.
>>> 
>>> I know that LC fields support emoji and other unicode characters. I can cut 
>>> and paste them in and they display fine.
>>> 
>>> My steps in getting the data from the DB to a LC field are:
>>> 
>>> Load the data into an array element like:
>>> put revDatabaseColumnNamed(sRecSet,"tw_full_text") into 
>>> gCurrentRec["tw_full_text"]
>>> 
>>> Then:
>>> 
>>> put gCurrentRec["tw_full_text"] into fld "tw_full_text"
>>> 
>>> 
>>> I’m probably missing some encoding or decoding step along the way… can some 
>>> one point me in the right direction?
>>> 
>>> Thanks,
>>> 
>>> Steve MacLean
>>> ___
>>> 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: Database data & emoji's

2018-08-14 Thread Stephen MacLean via use-livecode
Hi Tore,

Thanks, but I’ve already looked at and tried those.

Even putting the data directly from the RecordSet to the field just results in 
question marks “?” where the emoji should be:

put textDecode(revDatabaseColumnNamed(sRecSet,"tw_full_text")) into fld 
"cleaned_tw_content" of cd  “twCleaner"

The table and field in the table are utf8mb4 encoded to allow the storing of 
emoji and other UTF data.

My connection in Navicat show it to be UTF-8 as well, and I can see the emoji 
in the results. However, I don’t see an option to set this in the 
revOpenDatabase(), so I take it that LC does it automatically…

Any other ideas appreciated.

TIA,

Steve MacLean


> On Aug 14, 2018, at 6:24 PM, Tore Nilsen via use-livecode 
>  wrote:
> 
> You should look up textEncode and textDecode in the dictionary. I think they 
> may prove useful.
> 
> Best regards
> Tore Nilsen
> 
> ---
> This mail contains no viruses or bacteria as it is electronically produced 
> and untouched by human hands. Once printed it may or may not contain various 
> microorganisms that can cause diseases. Print and hand out at own risk. 
> Unsolicited distribution of this mail is prohibited.
> 
> 
> 
> 
> 
> 
> 
>> 15. aug. 2018 kl. 00:18 skrev Stephen MacLean via use-livecode 
>> :
>> 
>> Hi All,
>> 
>> So I have data (text) stored in a mySQL DB that is set for UTF8 and it 
>> stores unicode and emoji characters just fine. 
>> 
>> My problem is that when I pull a field from the record set and put it into a 
>> LC field, I don’t get the unicode or emoji, just the the usual strange 
>> characters.
>> 
>> I know that LC fields support emoji and other unicode characters. I can cut 
>> and paste them in and they display fine.
>> 
>> My steps in getting the data from the DB to a LC field are:
>> 
>> Load the data into an array element like:
>> put revDatabaseColumnNamed(sRecSet,"tw_full_text") into 
>> gCurrentRec["tw_full_text"]
>> 
>> Then:
>> 
>> put gCurrentRec["tw_full_text"] into fld "tw_full_text"
>> 
>> 
>> I’m probably missing some encoding or decoding step along the way… can some 
>> one point me in the right direction?
>> 
>> Thanks,
>> 
>> Steve MacLean
>> ___
>> 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

Database data & emoji's

2018-08-14 Thread Stephen MacLean via use-livecode
Hi All,

So I have data (text) stored in a mySQL DB that is set for UTF8 and it stores 
unicode and emoji characters just fine. 

My problem is that when I pull a field from the record set and put it into a LC 
field, I don’t get the unicode or emoji, just the the usual strange characters.

I know that LC fields support emoji and other unicode characters. I can cut and 
paste them in and they display fine.

My steps in getting the data from the DB to a LC field are:

Load the data into an array element like:
put revDatabaseColumnNamed(sRecSet,"tw_full_text") into 
gCurrentRec["tw_full_text"]

Then:

put gCurrentRec["tw_full_text"] into fld "tw_full_text"


I’m probably missing some encoding or decoding step along the way… can some one 
point me in the right direction?

Thanks,

Steve MacLean
___
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: Cropping a referenced image

2018-08-14 Thread Stephen MacLean via use-livecode


> On Aug 14, 2018, at 12:18 PM, Stephen MacLean via use-livecode 
>  wrote:
> 
> set the text of checkImgID to empty
> 
> export snapshot from rect (rect of cropRectID) of checkImgID to tTempCrop as 
> JPEG
> 
> set the text of heroImgID to tTempCrop


This should be this:

> set the text of checkImgID to empty
> 
> export snapshot from rect (rect of cropRectID) of checkImgID to tTempCrop as 
> JPEG
> 
> set the text ofcheckImgID to tTempCrop

Sorry!

Steve MacLean
___
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: Cropping a referenced image

2018-08-14 Thread Stephen MacLean via use-livecode

> 
> 
> #test
> 
> on mouseup
> 
> put the long id of img "thumbTemplate" into pImage
> 
> put the loc of pImage into pLocation
> 
> set the filename of pImage to 
> "https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg;
> 
> 
> --set the filename of pImage to 
> "https://i.ytimg.com/vi/KO3l3-4pFyo/hqdefault.jpg;
> 
> set the loc of pImage to pLocation
> 
> end mouseup
> 
> USE CASE:
> 
> 1) eliminate top and bottom letter boxing on YouTube thumbnails. Easy done on 
> web with CSS, not easy in LC
> 2) They provide a 4x3 by ratio
> 3) But when you post an HD video, thumbnail is 16x9, letterbox, top and 
> bottom (45 pix of the hqdefault.jpg).
> 4) All youTube video channel thumbnails are letterboxed -- we don't 4X3 
> videos, ever...
> 6) "crop" command does on work with referenced images.
> 7) Look for a simple method that in the data grid takes up very little CPU 
> time.
> 8) options
> a) seems like I could make a mask on top the image to eliminate the 
> letterbox.
> b) other options?
> 9) we could go to the trouble to down load the thumb and crop and store them 
> in /documents (mobile app); but there's no point: the user *has* to have a 
> internet connection to use this module to view YouTube; and the call to 
> https://i.ytimg.com is very fast, so why bother?
> 
> Spotify does a similar thing: it has a generic icon until the album cover is 
> loaded.
> 
> Any ideas?  Meanwhile I'll explored masking.
> 
> BR


Hi BR,

I’ve had problems with "set the filename of pImage to” and use a slightly 
different method (In a nutshell):

on a card (cropImg), I have a blank image for loading the image into (checkImg) 
and a rectangle set to the size I want to crop (cropRect).

First, put get the image and put that image into your blank (I do use tsNet 
directly to do this, as it seems to be the most reliable, even though the URL 
library uses tsNet:

put URL tURL into tempImage
put tempImage into image "checkImg" of card "chkImg"

In script I position the crop rectangle over the image the way I want it.

Next, export the image inside the cropRect:

put the long ID of grc "cropRect" of cd "cropImg" of stack "imgEngine" into 
cropRectID

put the long ID of img "checkImg" of cd "cropImg" of stack "imgEngine" into 
checkImgID

# Export the cropped image

set the text of checkImgID to empty

export snapshot from rect (rect of cropRectID) of checkImgID to tTempCrop as 
JPEG

set the text of heroImgID to tTempCrop


From there you can save it or do whatever else you want to do:)

HTH,

Steve MacLean
___
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: LC 9 and Memory

2018-08-13 Thread Stephen MacLean via use-livecode

> On Aug 13, 2018, at 2:07 PM, Mark Waddingham via use-livecode 
>  wrote:
> 
> Is there any way to split up the processing of a single batch into pieces, 
> each run in its own process (sequentially?) - that approach actually gives 
> you two things - (1) a fix to the exhaustion problem you are having and (2) 
> the ability to recover most of the batch if one piece fails.
> 

It’s about a split up as I can make it… I like to do that myself because 1) 
Helps me follow the code better 2) As you said, a failure or error won’t botch 
the whole thing. The only way to really make it smaller would be to limit the 
query. But, after this initial “heavy lifting”, it will be run against MUCH 
smaller data sets, on a regular basis. At which point it probably won’t matter, 
but I can see a cumulative effect build up if it is a memory leak.

I will let you know on the dump.

Best,

Steve



___
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: LC 9 and Memory

2018-08-13 Thread Stephen MacLean via use-livecode
Hi Mark,

Yes, doing quite a bit, which LC handles just fine:) Except for these with big 
queries;) I do want to mention that I call plenty of functions, so it’s not a 
real tight loop, just a loop with a lot going on. 

Ok, will do the next time I run one of these… These big batches take about 5 
hours to run.

Thanks,

Steve

> On Aug 13, 2018, at 1:55 PM, Mark Waddingham via use-livecode 
>  wrote:
> 
> On 2018-08-13 19:42, Stephen MacLean via use-livecode wrote:
>> Anyone experience this before? Any tips for  controlling it?
> 
> Well it sounds like you are doing a fair bit there so its really hard to say 
> whether or not there is a memory leak.
> 
> The first thing to do is to find out whether that is actually 22Gb in use, or 
> just an 'illusion'.
> 
> Leave you application running so that you can observe the gradually increase 
> of memory. Then determine its PID (should be visible in Activity Monitor) 
> then do from Terminal:
> 
>  heap 
> 
> And share the report which is emitted to stdout with us :)
> 
> Warmest Regards,
> 
> Mark.
> 
> -- 
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
> 
> ___
> 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: LC 9 and Memory

2018-08-13 Thread Stephen MacLean via use-livecode
Yes, it’s on MacOS 10.12.6. No, this is in use… and cause my open apps, 
including LC,  to be “paused” saying that I had run out of memory.

I have 32GB of real RAM and a 4TB SSD that the OS sits on, with half of that 
free. The swap file had grown to almost 30GB in size, with most of it used., 
which is probably why I paused everything… 

> On Aug 13, 2018, at 1:47 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Is this on a Mac? I know that for Macs, memory can be "in use" by an app, but 
> the app will release it on request. "wired" memory is that which an app has 
> allocated and will not release. Right now I have 11+ of 16 gigs of memory in 
> use, but only 2.32 of it is "wired". If you look at the Activity Monitor, the 
> indicator for Memory Pressure is really the indication of available 
> resources. 
> 
> Windows these days probably uses a similar way of managing memory. 
> 
> Bob S
> 
> 
>> On Aug 13, 2018, at 10:42 , Stephen MacLean via use-livecode 
>>  wrote:
>> 
>> Hi All,
>> 
>> I’m running into an issue where LC 9.0.1 RC1 Business is running a process 
>> and is gobbling up memory and then not releasing it until I quit LC. Like 
>> 22GB of memory!
>> 
>> Let me describe what I’m doing: I’m getting a query back from a MYSQL DB 
>> that contains 32k records, all text. Using revQueryDatabase() to put the 
>> data into a record set and the move cursor to go through each record in a 
>> repeat loop.
>> 
>> During the loop, I’m calling multiple functions that use a variety of all 
>> the goodies LC has: tsNet directly to get some data and PUT and POST URL 
>> were they work fine (For some reason, they don’t work on some URL’s, but 
>> tsNet does). Processing that data and saving it back to the DB into a 
>> different table. While doing this I’m putting some text into a logging 
>> field, moving a progress bar and updating a counter field to show what 
>> record it’s on . I’m also running a timer to show the elapsed time.
>> 
>> When done I save the log fld to a text file, then clear it. I also close the 
>> record set.
>> 
>> The memory used for LC always goes up, but never goes down unless I quit.
>> 
>> What am I missing? LC does it’s own GC and memory management, but in this 
>> case, I don’t see it.
>> 
>> Anyone experience this before? Any tips for  controlling it?
>> 
>> TIA,
>> 
>> Steve MacLean
> 
> ___
> 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

LC 9 and Memory

2018-08-13 Thread Stephen MacLean via use-livecode
Hi All,

I’m running into an issue where LC 9.0.1 RC1 Business is running a process and 
is gobbling up memory and then not releasing it until I quit LC. Like 22GB of 
memory!

Let me describe what I’m doing: I’m getting a query back from a MYSQL DB that 
contains 32k records, all text. Using revQueryDatabase() to put the data into a 
record set and the move cursor to go through each record in a repeat loop.

During the loop, I’m calling multiple functions that use a variety of all the 
goodies LC has: tsNet directly to get some data and PUT and POST URL were they 
work fine (For some reason, they don’t work on some URL’s, but tsNet does). 
Processing that data and saving it back to the DB into a different table. While 
doing this I’m putting some text into a logging field, moving a progress bar 
and updating a counter field to show what record it’s on . I’m also running a 
timer to show the elapsed time.

When done I save the log fld to a text file, then clear it. I also close the 
record set.

The memory used for LC always goes up, but never goes down unless I quit.

What am I missing? LC does it’s own GC and memory management, but in this case, 
I don’t see it.

Anyone experience this before? Any tips for  controlling it?

TIA,

Steve MacLean



___
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: HTML to text in field

2018-08-09 Thread Stephen MacLean via use-livecode
Hi David,

I’m working on something thing similar at the moment (although I’m stripping 
out almost everything except for basic HTML formatting).

I too found that nugget by JLG and had the similar results. I’ve also looked at 
using XML and regex. The problem with HTML is that while it’s a standard, 
unless it’s strict xHtml, it’s not really and a lot of it ends up being 
malformed, etc. Todays browsers are very forgiving and figure most of it out, 
but if you open the dev tools in safari or firefox and look at most pages, you 
will see a LOT of errors.

So I don’t think there is an “out of the box” answer. My solution is similar to 
what you are trying, stripping out tags and some other things and cleaning it 
up to give me what I want.

If your solution (after fixing the function vs command syntax that Klaus 
pointed out) doesn’t work for you, I could put together an example stack using 
my “cleaner” to share. I don’t claim it’s the best, only or anything else way 
to do it, other than it works for me and am happy to share.

Best,

Steve MacLean

> On Aug 9, 2018, at 8:00 AM, David V Glasgow via use-livecode 
>  wrote:
> 
> Hello folks,
> 
> I am having an interesting time (MacOS 10.13.5 LC 8.1.9) trying to load some 
> HTML files (≤ 5 ish MB).  Most of them will be lists or tables, generated by 
> various users on various systems.
> 
> I don’t want to retain any of the formatting, except line endings, so I would 
> be happy for tables to appear as lists.  I found a little 2013 nugget from 
> the estimable  Jacqueline Landman Gay
> 
> set the htmltext of the templatefield to htmlVar -- variable contains the 
> html string
> put the text of the templatefield into tPlainText
> 
> In some cases that works fine, but in others, it seems that HTML tables 
> consisting  of maybe 20-30 thousand rows are rendered onto a single line of 
> the field.  A sort of black-letters-overwritten splodge appears in the first 
> row and LC cranks up to 100% of the processor and BBoD ensues.
> 
> Sometimes it never seems to recover, but other times it hands back control 
> after maybe 20 minutes or so, and in those cases I can see the text if I set 
> dontwrap to false.  It contains no line endings from the original table, and 
> a shedload of tabs.
> 
> I have tried to operate on the HTML string in a variable before putting it 
> into the field, but frankly don’t really know what property of some HTML 
> tables might mean that line endings are lost.  I can only see  when I 
> examine the files in an editor.  
> 
> I tried a different approach, replacing a row end with a cr, and then 
> stripping out tags:
> 
> put URL ("file:" & theFilePath) into ttemp
> 
> replace "" with cr in ttemp
> 
> replaceText (ttemp, "<*>", "|")
> 
> filter lines of ttemp without empty
> 
> set the text of field "import" to ttemp
> 
> 
> The replaceText line generates an error “button "Import HTML": execution 
> error at line 7 (Handler: can't find handler) near "replaceText", char 1”  
> 
> Firstly I don’t get the error, and secondly I am worried I may be over 
> complicating something which should be simple.
> 
> Advice please!
> 
> Best wishes,
> 
> David Glasgow
> ___
> 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: Start using stack - Loading stack libraries

2018-08-06 Thread Stephen MacLean via use-livecode

> On Aug 6, 2018, at 8:05 AM, Paul Dupuis via use-livecode 
>  wrote:
> 
> On 8/5/2018 11:29 PM, Stephen MacLean via use-livecode wrote:
>> @ Paul, they are different, based upon the type of build that needs to 
>> happen for the source that is being looked at. The code has one handler name 
>> that is the same (The init code in the builder), but after that the code is 
>> different.
> 
> Some where, you have a conditional or switch statements to decide what
> library to load based on the "source". File I/O is always slower than
> most anything else in a computer these days. So if you load all the
> libraries and use the switch/if/etc. to just change what library
> routines are called based on the "source" rather than change what is
> read from disk, you will reduce any (if there are any) memory leaks
> issues and speed up your work. It's up to you as I, of course, have no
> idea what your code looks like or even what you're doing.
> 
> I get the impression that each library has many routines that have the
> same name (as in other libraries) but do different things. It may be
> more effort that any performance gain is worth to have to rename all
> those routines and adjust code so they can be all loaded at once.

You are correct, same name, but do different things. Each has routines that are 
self-contained, and only rely on core functions that are at the main stack 
level.

I’ve read that there is something like a 50 stack limit that can be loaded at 
one time, which is why I initially went this way. Do you know if that is still 
the case?

> 
> Ultimately, the best way to determine if your approach to loading and
> unloading libraries in volume is to construct a quality assurance test -
> get or generate a while pile of "sources" and run them through on a test
> system and see what happens.
> 


In this process now and hoping to see good results with the way it is, but 
always looking to improve.

Thx!

Steve



___
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: Start using stack - Loading stack libraries

2018-08-05 Thread Stephen MacLean via use-livecode
Hi Paul and Monte,

Thanks for the input!

@ Monte, I might be able to order the initial query so that they are grouped 
together by builder type. Then I could process those together with doing one 
load and unload for that group

@ Paul, they are different, based upon the type of build that needs to happen 
for the source that is being looked at. The code has one handler name that is 
the same (The init code in the builder), but after that the code is different.

All input welcome:)

Thanks,

Steve

> On Aug 5, 2018, at 9:21 PM, Paul Dupuis via use-livecode 
>  wrote:
> 
> On 8/5/2018 8:51 PM, Stephen MacLean via use-livecode wrote:
>> Any insight is appreciated!
>> 
> 
> I use a lot of library stacks, but our model is to load them on startup
> and unload on shutdown (not really necessary singe the engine does this
> on quit). Unless you have zillions of lines of code, I am not sure what
> the value is of unloading and reloading the same library?
> 
> ___
> 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


Start using stack - Loading stack libraries

2018-08-05 Thread Stephen MacLean via use-livecode
Hi All,

I am currently using library stacks that contain what I call custom builders, 
that are livecode script libraries. These stacks have code for specific 
instances and when done, I currently unload them. I like that I can use these, 
and build them, on the fly, bringing that code in without having to “disturb” 
the main app.

As I’m about to start loading and unloading them hundreds if not thousands of 
times, and very rapidly, I started thinking about how this would effect 
performance, memory issues, etc.

Does anyone have experience doing this and doing it rapidly? Anyone come across 
any memory issues, leakage, etc.? Anything else I should look for in doing 
this? Different ways to accomplish the same thing?

Any insight is appreciated!

Thanks,

Steve MacLean

___
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: put URL oddity

2018-08-03 Thread Stephen MacLean via use-livecode
While *verified* encryption may be “required” by the major browsers and others 
for preventing "Man In the Middle” attacks, it’s still a hair ball that a lot 
of sites still haven’t figured out properly… and THAT is the big problem. 

Cost, expertise, hosting, maintenance of certs, etc. all contribute to it not 
being the standard that folks would like it to be. Free certs and tools to make 
it easier to implement are helping, but there is a long way to go. I’m sure it 
will get there at some point.

I am glad to see that LC is supporting the verification of certs, good stuff. A 
few years ago, I ran into an issue where it couldn’t verify a valid, verified 
cert from a major vendor.

I do like your idea though;)

Steve

> On Aug 3, 2018, at 4:51 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> When working with web servers, encryption is in fact ALWAYS required, because 
> if someone can get at your web server they can plant drive by malware. 
> Anything exposed to the internet requires modern encryption, and it can be 
> argued that anything exposed to ANY network requires it. 
> 
> The alternative would have been to form an international squad of specialized 
> assasins to hunt down every known hacker and purveyor of malware, and leave 
> their tortured maimed bodies on the steps of the capital buildings of 
> wherever they are from, so everyone gets the message. Unfortunately, the 
> legal ramifications would have been too much to overcome. 
> 
> Bob S
> 
> 
>> On Aug 3, 2018, at 13:45 , Stephen MacLean via use-livecode 
>>  wrote:
>> 
>> Yes, what a nightmare!
>> 
>> This is going to be a nightmare for years to come… I understand the desire 
>> for secure communications, but it’s not always required or even beneficial.
>> 
>> Just as those astronauts had better have a fall back plan, so should we:)
>> 
>> Steve
> 
> ___
> 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: put URL oddity

2018-08-03 Thread Stephen MacLean via use-livecode
Yes, what a nightmare!

This is going to be a nightmare for years to come… I understand the desire for 
secure communications, but it’s not always required or even beneficial.

Just as those astronauts had better have a fall back plan, so should we:)

Steve

> On Aug 3, 2018, at 4:40 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> And we want to send men to another solar system! Can you imagine 8 years out, 
> you need to make a minor course adjustment, but the computer keeps saying the 
> certificate is expired??
> 
> Bob S
> 
> 
>> On Aug 3, 2018, at 13:23 , Stephen MacLean via use-livecode 
>>  wrote:
>> 
>> Ok, found it! In this case, you must set:
>> 
>> libURLSetSSLVerification true
>> 
>> Otherwise you get that error, and in my case, nothing is returned, not even 
>> the error, at least with out using that tool.
>> 
>> Grrr!!! In a world where not everyone is using SSL even today, or using it 
>> properly, this is always going to be a problem… Ah well!
>> 
>> Thanks for all the help everyone!!!
>> 
>> Best,
>> 
>> Steve
> 
> ___
> 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: put URL oddity

2018-08-03 Thread Stephen MacLean via use-livecode
On Aug 3, 2018, at 4:12 PM, Stephen MacLean via use-livecode 
 wrote:
> 
> 
>> On Aug 3, 2018, at 3:54 PM, Mark Wieder via use-livecode 
>>  wrote:
>> 
>> On 08/03/2018 10:07 AM, Stephen MacLean via use-livecode wrote:
>>> Hi All,
>>> I’m experiencing at put URL oddity:
>>> Entering: put URL "https://www.google.com” into the message box returns the 
>>> HtML for the google home page, which is what I expect.
>>> Entering: put URL "https://www.milfordmirror.com/“ returns absolutely 
>>> nothing, no errors, no content whatsoever. Just empty. Not what I expect.
>> 
>> Using Chrome's developer tools I can see no redirection going on here.
>> 
>> Watch your use of double quotes there. Your final character is a 'smart' 
>> quote (%E2). If I fix that then the put statement works fine.
>> 
> 
> Thanks Mark, but that quote here is a regular quote. And I get nothing, even 
> if I type the whole thing into the message box, which is what I’ve been doing 
> to test.
> 
> Using Charles W’s neat little tools for debugging requests 
> (https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode 
> <https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode>) I get 
> that error:
> 
> _proxyForURL_proxyForURL end with none foundProxy for URL:
> Rebuilt URL to: https://www.milfordmirror.com/
> 
> Hostname www.milfordmirror.com was found in DNS cache
> 
> Trying 104.31.78.67...
> 
> TCP_NODELAY set
> 
> Connected to www.milfordmirror.com (104.31.78.67) port 443 (#50)
> 
> WARNING: disabling hostname validation also disables SNI.
> 
> SSL re-using session ID
> 
> SSL peer handshake failed, the server most likely requires a client 
> certificate to connect
> 
> Closing connection 50
> 
> Using his tool for TS Net 
> (https://downloads.techstrategies.com.au/tsnet/sample_sync_stack.livecode) I 
> get:
> 
> tsneterr: (35) SSL peer handshake failed, the server most likely requires a 
> client certificate to connect
> 
> I’m all for figuring this out, but something seems to be very different 
> between our results.
> 
> Quitting LC has no effect as well.
> 
> I’m running MacOS 10.12.6
> 
> 


Ok, found it! In this case, you must set:

 libURLSetSSLVerification true

Otherwise you get that error, and in my case, nothing is returned, not even the 
error, at least with out using that tool.

Grrr!!! In a world where not everyone is using SSL even today, or using it 
properly, this is always going to be a problem… Ah well!

Thanks for all the help everyone!!!

Best,

Steve

___
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: put URL oddity

2018-08-03 Thread Stephen MacLean via use-livecode

> On Aug 3, 2018, at 3:54 PM, Mark Wieder via use-livecode 
>  wrote:
> 
> On 08/03/2018 10:07 AM, Stephen MacLean via use-livecode wrote:
>> Hi All,
>> I’m experiencing at put URL oddity:
>> Entering: put URL "https://www.google.com” into the message box returns the 
>> HtML for the google home page, which is what I expect.
>> Entering: put URL "https://www.milfordmirror.com/“ returns absolutely 
>> nothing, no errors, no content whatsoever. Just empty. Not what I expect.
> 
> Using Chrome's developer tools I can see no redirection going on here.
> 
> Watch your use of double quotes there. Your final character is a 'smart' 
> quote (%E2). If I fix that then the put statement works fine.
> 

Thanks Mark, but that quote here is a regular quote. And I get nothing, even if 
I type the whole thing into the message box, which is what I’ve been doing to 
test.

Using Charles W’s neat little tools for debugging requests 
(https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode 
<https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode>) I get 
that error:

_proxyForURL_proxyForURL end with none foundProxy for URL:
Rebuilt URL to: https://www.milfordmirror.com/

Hostname www.milfordmirror.com was found in DNS cache

Trying 104.31.78.67...

TCP_NODELAY set

Connected to www.milfordmirror.com (104.31.78.67) port 443 (#50)

WARNING: disabling hostname validation also disables SNI.

SSL re-using session ID

SSL peer handshake failed, the server most likely requires a client certificate 
to connect

Closing connection 50

Using his tool for TS Net 
(https://downloads.techstrategies.com.au/tsnet/sample_sync_stack.livecode) I 
get:

tsneterr: (35) SSL peer handshake failed, the server most likely requires a 
client certificate to connect

I’m all for figuring this out, but something seems to be very different between 
our results.

Quitting LC has no effect as well.

I’m running MacOS 10.12.6

Thanks,

Steve


___
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: put URL oddity

2018-08-03 Thread Stephen MacLean via use-livecode
Ok, so dug a bit deeper into this using TSNet.

the result I’m getting back is:

tsneterr: (35) SSL peer handshake failed, the server most likely requires a 
client certificate to connect

So it looks like the connection itself is being rejected.

Some googling came across some of the same issues with CURL, which IRC, TSNet 
uses??

Adding tsNetVerifySSLPeer false to disable SSL peer verification doesn’t help 
either.

Doesn’t solve the problem either.

Help from Charles W or someone else would be greatly appreciated.

Thanks,

Steve MacLean

> On Aug 3, 2018, at 3:13 PM, Stephen MacLean via use-livecode 
>  wrote:
> 
> Thanks Tom, it defaults to true, but even setting it, still nothing returned 
> :(
> 
>> On Aug 3, 2018, at 2:49 PM, Tom Glod via use-livecode 
>>  wrote:
>> 
>> i should have mentioned in you original reply... check out
>> libURLFollowHttpRedirects in dictionary ... never had to use it but i
>> suppose thats what its for.
>> 
>> 
>>>>>> 
>>>>>>>> Hi All,
>>>>>>>> 
>>>>>>>> I’m experiencing at put URL oddity:
>>>>>>>> 
>>>>>>>> Entering: put URL "https://www.google.com” into the message box
>>>>>> returns the HtML for the google home page, which is what I expect.
>>>>>>>> 
>>>>>>>> Entering: put URL "https://www.milfordmirror.com/“ returns
>> absolutely
>>>>>> nothing, no errors, no content whatsoever. Just empty. Not what I
>> expect.
>>>>>>>> 
>>>>>>>> The URL is valid, put it into a browser and you get a page.
>>>>>>>> 
>>>>>>>> Set the url of a browser widget and you get the page.
>>>>>>>> 
>>>>>>>> I’m wondering if I need to set httpHeaders to get this to return
>>>>>> something, but have no idea what that might be.
>>>>>>>> 
>>>>>>>> Has anyone experienced this before and if so, how did you work
>> around
>>>>>> it?
>>>>>>>> 
>>>>>>>> TIA,
>>>>>>>> 
>>>>>>>> Steve MacLean
>>>>>>>> 
>>>>>>>> LC 9.0.1 RC1 Business
>>>>>>>> 

___
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: put URL oddity

2018-08-03 Thread Stephen MacLean via use-livecode
Thanks Tom, it defaults to true, but even setting it, still nothing returned :(

> On Aug 3, 2018, at 2:49 PM, Tom Glod via use-livecode 
>  wrote:
> 
> i should have mentioned in you original reply... check out
> libURLFollowHttpRedirects in dictionary ... never had to use it but i
> suppose thats what its for.
> 
> 
> On Fri, Aug 3, 2018 at 2:46 PM, Stephen MacLean via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>> 
>> Thanks, I think that it is as Tom mentioned a re-direct. That site is
> built using wordpress, and that’s most of what WP does.
>> 
>> So that begs the question, how do I get the  put URL command to follow a
> redirect?
>> 
>> Thanks,
>> 
>> Steve
>> 
>>> On Aug 3, 2018, at 2:41 PM, Peter Bogdanoff via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>>> 
>>> For what it’s worth:
>>> 
>>> Using the URLs of the other affiliated newspaper sites at the bottom of
> the Milford Mirror page also don’t return anything in the message box.
>>> 
>>> Peter
>>> 
>>>> On Aug 3, 2018, at 11:24 AM, Tom Glod via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> maybe the url is a redirect and your request is not following it.
>>>> 
>>>> On Fri, Aug 3, 2018 at 1:49 PM, Stephen MacLean via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>>> Hi Brian,
>>>>> 
>>>>> Thanks for the reply, but I’m confused… the protocol is there:
> https://
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Steve
>>>>> 
>>>>>> On Aug 3, 2018, at 1:18 PM, Brian Milby via use-livecode <
>>>>> use-livecode@lists.runrev.com> wrote:
>>>>>> 
>>>>>> For me I have to include the protocol. So the “http://“ needs to be
>>>>> there to get any output.
>>>>>> 
>>>>>> Thanks,
>>>>>> Brian
>>>>>> On Aug 3, 2018, 12:08 PM -0500, Stephen MacLean via use-livecode <
>>>>> use-livecode@lists.runrev.com>, wrote:
>>>>>>> Hi All,
>>>>>>> 
>>>>>>> I’m experiencing at put URL oddity:
>>>>>>> 
>>>>>>> Entering: put URL "https://www.google.com” into the message box
>>>>> returns the HtML for the google home page, which is what I expect.
>>>>>>> 
>>>>>>> Entering: put URL "https://www.milfordmirror.com/“ returns
> absolutely
>>>>> nothing, no errors, no content whatsoever. Just empty. Not what I
> expect.
>>>>>>> 
>>>>>>> The URL is valid, put it into a browser and you get a page.
>>>>>>> 
>>>>>>> Set the url of a browser widget and you get the page.
>>>>>>> 
>>>>>>> I’m wondering if I need to set httpHeaders to get this to return
>>>>> something, but have no idea what that might be.
>>>>>>> 
>>>>>>> Has anyone experienced this before and if so, how did you work
> around
>>>>> it?
>>>>>>> 
>>>>>>> TIA,
>>>>>>> 
>>>>>>> Steve MacLean
>>>>>>> 
>>>>>>> LC 9.0.1 RC1 Business
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> ___
>>>>>>> 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
>>> 
>>> 
>>> ___
>>> 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: put URL oddity

2018-08-03 Thread Stephen MacLean via use-livecode
Thanks, I think that it is as Tom mentioned a re-direct. That site is built 
using wordpress, and that’s most of what WP does.

So that begs the question, how do I get the  put URL command to follow a 
redirect?

Thanks,

Steve

> On Aug 3, 2018, at 2:41 PM, Peter Bogdanoff via use-livecode 
>  wrote:
> 
> For what it’s worth:
> 
> Using the URLs of the other affiliated newspaper sites at the bottom of the 
> Milford Mirror page also don’t return anything in the message box.
> 
> Peter
> 
>> On Aug 3, 2018, at 11:24 AM, Tom Glod via use-livecode 
>>  wrote:
>> 
>> maybe the url is a redirect and your request is not following it.
>> 
>> On Fri, Aug 3, 2018 at 1:49 PM, Stephen MacLean via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> Hi Brian,
>>> 
>>> Thanks for the reply, but I’m confused… the protocol is there: https://
>>> 
>>> Thanks,
>>> 
>>> Steve
>>> 
>>>> On Aug 3, 2018, at 1:18 PM, Brian Milby via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> For me I have to include the protocol. So the “http://“ needs to be
>>> there to get any output.
>>>> 
>>>> Thanks,
>>>> Brian
>>>> On Aug 3, 2018, 12:08 PM -0500, Stephen MacLean via use-livecode <
>>> use-livecode@lists.runrev.com>, wrote:
>>>>> Hi All,
>>>>> 
>>>>> I’m experiencing at put URL oddity:
>>>>> 
>>>>> Entering: put URL "https://www.google.com” into the message box
>>> returns the HtML for the google home page, which is what I expect.
>>>>> 
>>>>> Entering: put URL "https://www.milfordmirror.com/“ returns absolutely
>>> nothing, no errors, no content whatsoever. Just empty. Not what I expect.
>>>>> 
>>>>> The URL is valid, put it into a browser and you get a page.
>>>>> 
>>>>> Set the url of a browser widget and you get the page.
>>>>> 
>>>>> I’m wondering if I need to set httpHeaders to get this to return
>>> something, but have no idea what that might be.
>>>>> 
>>>>> Has anyone experienced this before and if so, how did you work around
>>> it?
>>>>> 
>>>>> TIA,
>>>>> 
>>>>> Steve MacLean
>>>>> 
>>>>> LC 9.0.1 RC1 Business
>>>>> 
>>>>> 
>>>>> 
>>>>> ___
>>>>> 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
> 
> 
> ___
> 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: put URL oddity

2018-08-03 Thread Stephen MacLean via use-livecode
Hi Brian,

Thanks for the reply, but I’m confused… the protocol is there: https://

Thanks,

Steve

> On Aug 3, 2018, at 1:18 PM, Brian Milby via use-livecode 
>  wrote:
> 
> For me I have to include the protocol. So the “http://“ needs to be there to 
> get any output.
> 
> Thanks,
> Brian
> On Aug 3, 2018, 12:08 PM -0500, Stephen MacLean via use-livecode 
> , wrote:
>> Hi All,
>> 
>> I’m experiencing at put URL oddity:
>> 
>> Entering: put URL "https://www.google.com” into the message box returns the 
>> HtML for the google home page, which is what I expect.
>> 
>> Entering: put URL "https://www.milfordmirror.com/“ returns absolutely 
>> nothing, no errors, no content whatsoever. Just empty. Not what I expect.
>> 
>> The URL is valid, put it into a browser and you get a page.
>> 
>> Set the url of a browser widget and you get the page.
>> 
>> I’m wondering if I need to set httpHeaders to get this to return something, 
>> but have no idea what that might be.
>> 
>> Has anyone experienced this before and if so, how did you work around it?
>> 
>> TIA,
>> 
>> Steve MacLean
>> 
>> LC 9.0.1 RC1 Business
>> 
>> 
>> 
>> ___
>> 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

put URL oddity

2018-08-03 Thread Stephen MacLean via use-livecode
Hi All,

I’m experiencing at put URL oddity:

Entering: put URL "https://www.google.com” into the message box returns the 
HtML for the google home page, which is what I expect.

Entering: put URL "https://www.milfordmirror.com/“ returns absolutely nothing, 
no errors, no content whatsoever. Just empty. Not what I expect.

The URL is valid, put it into a browser and you get a page.

Set the url of a browser widget and you get the page.

I’m wondering if I need to set httpHeaders to get this to return something, but 
have no idea what that might be.

Has anyone experienced this before and if so, how did you work around it?

TIA,

Steve MacLean

LC 9.0.1 RC1 Business



___
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: Newbie Regex confusion

2018-08-01 Thread Stephen MacLean via use-livecode
Hi David,

While no expert on Regex, there are some online tools and libraries that you 
can use to work out the appropriate regex before putting it into your LC script.

Some sites I use:

https://www.regextester.com

https://regex101.com

https://www.rexegg.com/regex-quickstart.html

and 

http://www.regexlib.com

which has a lot of pre-built regex codes and examples. Most work without issue 
when putting them into LCS.

You can also take a look, if you haven’t already, at an example that I made 
using LCS and LCB, rsIsValid: https://forums.livecode.com/viewtopic.php?t=26653

HTH!

Steve MacLean

> On Aug 1, 2018, at 12:34 PM, David V Glasgow via use-livecode 
>  wrote:
> 
> 
> I am just dipping my toes in the shallows of regex, and have already stubbed 
> my toe on a rock.  Well two, actually.
> 
> I am looking to identify the lines of a field (that contain lots of words and 
> symbols with no particular structure or separator ) finding age related 
> terms, which can be in a variety of forms.  I made a list of the terms that I 
> want to use.
> 
> First problem:
> 
> I use the following filter line
> 
> filter lines of it with regex pattern i
> 
> … where i is a keyword lifted from my list.  Oddly, where i is just ordinary 
> characters, it works fine.  However if it includes a wildcard symbol, it 
> chokes with “execution error at line 9 (matchChunk: error in pattern 
> expression), char 1”.  For example, if i = child* (intending to match child, 
> childlike, childhood, childish etc).  I know that’s a bad example, because 
> just ‘child' will do the trick.  However, there seems to be some voodoo 
> needed to put a regex expression into a variable, is that right?
> 
> Second problem is the sheer brain ache from trying to work out how to 
> efficiently  match lines containing 8 yo, 8 yr, 8yr, 8yo, 8 year and 8year, 
> but not 18 year, 38yo etc etc.
> 
> The simplest way would be to include all variants in the keyword list.  
> However, that means more sweeps through the repeat loop.  And it wouldn’t 
> solve the problem of excluding  18 yo, 28 yo matching, unless I can construct 
> a regex expression which will test the absence of any number between 1 and 9 
> immediately before the actual string I am finding.  
> 
> Am I on a wild goose chase here?  
> 
> 
> 
> 
> Best Wishes,
> David Glasgow
> 
> 
>  
> 
>  
> 
> ___
> 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: Local images and the browser widget

2018-07-29 Thread Stephen MacLean via use-livecode
Hi Mike,

Thanks for that! I was doing the same thing at the same time:)

My code for setting up the server:

local sTempMedia


command setTempMedia

### Set the location of the tempMedia folder

# set the defaultFolder to the folder containing the stackfile

set the itemDelimiter to slash

get the effective filename of this stack

#set tempMedia folder location

put item 1 to - 2 of it & "/tempMedia" into sTempMedia

end setTempMedia


on startHTTPServer

# Launch httpd server to serve local images

setTempMedia

httpdStart "NewRequest", 8090, "imgEngine Server"

end startHTTPServer


on stopHTTPServer

httpdStop 8090

end stopHTTPServer


on NewRequest pSocketID, pRequest

local tPath

put sTempMedia & pRequest["resource"] into of tPath

if there is a file tPath then

local tData

put url ("binfile:" & tPath) into tData

httpdResponse pSocketID, 200, tData

else

-- not found

httpdResponse pSocketID, 404

end if

end NewRequest


My code for embedding it:
# tFileName is just the name of the file. i.e. MyFile.jpg
put "http://localhost:8090/; & (tFileName) into tHero

# other code would follow to meld tHero into my html

and works just amazingly well!!

Thanks again for all your help!

I sure hope this helps someone else as well!

Best,

Steve

> On Jul 29, 2018, at 8:02 PM, Mike Bonner via use-livecode 
>  wrote:
> 
> Decided to try using the httpd library, and it seems to work pretty
> nicely.  If you want to set up a very simple web picture viewer (VERY
> simple) the following code is a working but minimal start.
> 
> local sBaseDir
> on mouseup
>   httpdstart "newrequest",,"My Picture Server" --start the server on
> port 
>   put specialfolderpath("desktop") & "/pics" into sBaseDir -- Set this to
> the folder that contains your pictures
> end mouseup
> 
> on newRequest pSocketId,pRequest -- handle requests
>   if pRequest["resource"] is "/" then -- if the request has no filename,
> give the directory index of jpg files. (I only coded for jpegs)
>  put files(sBaseDir) into tFiles
>  repeat for each line tLIne in tFiles
> put merge("[[tLine]]") & cr after tData
> -- build up the response data for each file
>  end repeat
>  httpdresponse pSocketId,200,tData -- send the index
>   else
>  put "Content-Type: image/jpeg ;" into pHeader -- set the content type
> to jpeg
>  put URL("binfile:" & sBaseDir & pRequest["resource"]) into tData --
> read the image file and pop it into tData (binary mode)
>  httpdresponse pSocketId,200,tData,pHeader -- send the picture data,
> 200 ok code, and set the correct header for picture data
>   end if
> end newRequest
> 
> If your filenames/paths have spaces, you'd have to jump through some hoops
> to get it to work, and your base path has that space in it, so not sure how
> to get it working. Actually, nevermind.  If you change spaces in your
> baseurl to "\ " it may work?  I couldn't make it work here (on windows)
> despite trying a whole bunch of ideas, so I cheated and made sure there
> were no spaces.
> 
> On Sun, Jul 29, 2018 at 3:21 PM Stephen MacLean via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Thanks Mike, yes that does work for just displaying the image.
>> 
>> I’m building HTML on the fly and wanted to include the local image if
>> there was one, for testing. This will be a moot point for production as
>> everything will be served via a web server, but I was hoping to see this
>> for testing.
>> 
>> I will be looking to the new http server LC has as I will need it anyway
>> for doing some API things with this engine.
>> 
>> Thanks again to all!
>> 
>> Best,
>> Steve
>> 
>>> On Jul 29, 2018, at 5:03 PM, Mike Bonner via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> If you just need to see the image, you can do it by changing your
>> method..
>>> 
>>> Instead of setting the htmltext, it should work to set the url to  "
>>> http://Users/steve/Dropbox/ITB%20pubEngine/tempMedia/99578
>>> 6d6-4429-4821-8b21-8e811289e12c.jpg"
>>> 
>>> I'm not expert, but I think there is some type of cross-domain security
>>> thing interfering here.  A web page shouldn't be able to force access to
>> a
>>> file on your system due to security, unless the page originates with you.
>>> And I THINK that directly setting the html basically means there is no
>> base
>>> domain, so it will refuse to show the image.  Again, not an expert, 

Re: Local images and the browser widget

2018-07-29 Thread Stephen MacLean via use-livecode
Thanks Mike, yes that does work for just displaying the image.

I’m building HTML on the fly and wanted to include the local image if there was 
one, for testing. This will be a moot point for production as everything will 
be served via a web server, but I was hoping to see this for testing.

I will be looking to the new http server LC has as I will need it anyway for 
doing some API things with this engine.

Thanks again to all!

Best,
Steve

> On Jul 29, 2018, at 5:03 PM, Mike Bonner via use-livecode 
>  wrote:
> 
> If you just need to see the image, you can do it by changing your method..
> 
> Instead of setting the htmltext, it should work to set the url to  "
> http://Users/steve/Dropbox/ITB%20pubEngine/tempMedia/99578
> 6d6-4429-4821-8b21-8e811289e12c.jpg"
> 
> I'm not expert, but I think there is some type of cross-domain security
> thing interfering here.  A web page shouldn't be able to force access to a
> file on your system due to security, unless the page originates with you.
> And I THINK that directly setting the html basically means there is no base
> domain, so it will refuse to show the image.  Again, not an expert, so i'm
> just making a wag.
> If you need more control, you can likely create an html file on the fly and
> point your url to that, at which point you can use relative addressing for
> your pictures.  So, if you created the html file with your code in the same
> folder as your stack, you could then place..  6d6-4429-4821-8b21-8e811289e12c.jpg> into the file and it will likely work.
> 
> Another thing you might look into is running your own simple http server
> (which LC now makes easy) so that you can set up a simple server and set
> the url to http://localhost:8080/index.html  (or whatever port number you
> wish, and again, use relative pathing.
> 
> Either of these 2 methods is easier than using long, easily mangled
> absolute paths.   I haven't delved into the self run server yet, but I
> suspect you can do interesting things with it. (Or use the old revhttpd
> stack which I HAVE used, and know that it works really well and can do
> awesome stuff too)
> 
> 
> 
> On Sun, Jul 29, 2018 at 2:32 PM Stephen MacLean via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Almost afraid to ask this because I feel like it’s a path issue with
>> Relative vs Absolute… Remote images display fine in a browser widget, but
>> local image files don’t seem to.
>> 
>> This works (displays the image) in script and in the message box:
>> put "http://www.trumbull-ct.gov/images/BoyScouts.jpg; & ">"
>> into tHTML
>> 
>> set the htmlText of widget "finished_html_content" to tHTML
>> 
>> 
>> This does not (Image not displayed) in script or the message box:
>> put "> & ">" into tHTML
>> 
>> set the htmlText of widget "finished_html_content" to tHTML
>> 
>> 
>> Sorry about bombarding the list!
>> 
>> Thanks,
>> 
>> Steve
>> ___
>> 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: Local images and the browser widget

2018-07-29 Thread Stephen MacLean via use-livecode
No, the Folder is "ITB pubEngine”. The %20 is an URL escape for a space.

I was trying to avoid the relative path problems by giving it an absolute path, 
but that doesn’t seem to work.

Best,
Steve

> On Jul 29, 2018, at 4:58 PM, Peter Bogdanoff via use-livecode 
>  wrote:
> 
> It is very probably the file path.
> 
> Is:
> ITB%20pubEngine 
> 
> the actual name of the folder?
> 
> Peter
> 
> 
>> On Jul 29, 2018, at 1:31 PM, Stephen MacLean via use-livecode 
>>  wrote:
>> 
>> ox/ITB%20pubEngine/tempMedia/995786d6-4429-4821-8b21-8e811289e12c.jpg 
>> "
>>  & ">" into tHTML
> 
> ___
> 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

Local images and the browser widget

2018-07-29 Thread Stephen MacLean via use-livecode
Almost afraid to ask this because I feel like it’s a path issue with Relative 
vs Absolute… Remote images display fine in a browser widget, but local image 
files don’t seem to.

This works (displays the image) in script and in the message box:
put "http://www.trumbull-ct.gov/images/BoyScouts.jpg; & ">" into 
tHTML

set the htmlText of widget "finished_html_content" to tHTML


This does not (Image not displayed) in script or the message box:
put "" into tHTML

set the htmlText of widget "finished_html_content" to tHTML


Sorry about bombarding the list!

Thanks,

Steve
___
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: set the filename of image bug?

2018-07-29 Thread Stephen MacLean via use-livecode
Still more weirdness:

I removed the old sub-stack from my main stack, renamed it, saved it, quit LC 
and now it works fine.

Still, in the meantime, I’m rebuilding it from scratch and leaving outside the 
main stack, loading it as needed. If that goes well, I’ll do that for all my 
library stacks.

So I’m at a total loss here, nothing really to send now, I’m just scratching my 
head. I’ll play around with all this a bit more and see if I can re-create it. 
Otherwise I’ll just have to chalk it up some LC weirdness that I can’t 
reproduce.

Thanks again!

Steve

> On Jul 29, 2018, at 1:28 PM, Mike Bonner via use-livecode 
>  wrote:
> 
> If you think the stack is corrupted, you might send it to
> supp...@livecode.com so they can look at it, and/or post a bug report and
> include the stack there so that it can be looked at. (assuming there is
> nothing sensitive in the stack)
> 
> On Sun, Jul 29, 2018 at 11:24 AM Stephen MacLean via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Some other weirdness i’m noticing… When I copied a new image to that card,
>> it gave it a very high numbered ID that corresponded with one of the icons
>> in the image library.
>> 
>> I think I’m dealing with some kind of corruption here.
>> 
>> I’m going to rebuild this and give that a try. Thankfully it’s mostly
>> script with just a few cards and graphics for doing things.
>> 
>>> On Jul 29, 2018, at 1:03 PM, Stephen MacLean via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Ok, very strange… I created a test project to run in both 9.0.1 RC1 and
>> 9.0.0… and it works fine, yet doesn’t work in the image that I have in my
>> engine stack in either version.
>>> 
>>> Even renaming the old one and dragging a new image out and trying that
>> doesn’t work. Ugh!
>>> 
>>> I’m at a loss.
>>> 
>>> I’m running business in case that matters.
>>> 
>>> Thanks,
>>> 
>>> Steve
>>> 
>>>> On Jul 29, 2018, at 12:38 PM, Stephen MacLean via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> HI Klaus,
>>>> 
>>>> Wow, ok… I will have to check 9.0.0. Currently using 9.0.1 RC1 on
>> 10.12.6. It fails for me in both script and the inspector.
>>>> 
>>>> Thanks for testing!
>>>> 
>>>> Best,
>>>> 
>>>> Steve
>>>> 
>>>>> On Jul 29, 2018, at 12:34 PM, Klaus major-k via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>>>> 
>>>>> Hi Steve,
>>>>> 
>>>>>> Am 29.07.2018 um 18:28 schrieb Stephen MacLean via use-livecode <
>> use-livecode@lists.runrev.com>:
>>>>>> 
>>>>>> Hi All,
>>>>>> 
>>>>>> I’m having an issue with the “set the filename of img”.
>>>>>> This line: set the filename of img "checkImg" of cd "cropImg" stack
>> "imgEngine" to imgURL
>>>>>> Works as expected when using “http”. When using “https”, it fails to
>> get the image. No error is returned, but the image is blank.
>>>>>> 
>> https://pixfeeds.com/images/usa-travel/1280-589451788-statue-of-liberty-full-base.jpg
>> <
>> https://pixfeeds.com/images/usa-travel/1280-589451788-statue-of-liberty-full-base.jpg>
>> is the test image I’m using. Don’t see any reports of issues, but wanted to
>> know if anyone else has run into this.
>>>>> 
>>>>> just tested, works right out of the box in the IDE, by setting the
>> filename in the inspector and also via script!
>>>>> macOS 10.13.6, LC 9
>>>>> 
>>>>>> Thanks,
>>>>>> 
>>>>>> Steve MacLean
>>>>> 
>>>>> Best
>>>>> 
>>>>> Klaus
>>>>> 
>>>>> --
>>>>> Klaus Major
>>>>> http://www.major-k.de
>>>>> kl...@major-k.de
>>>>> 
>>>>> 
>>>>> ___
>>>>> 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-li

Re: set the filename of image bug?

2018-07-29 Thread Stephen MacLean via use-livecode
Some other weirdness i’m noticing… When I copied a new image to that card, it 
gave it a very high numbered ID that corresponded with one of the icons in the 
image library.

I think I’m dealing with some kind of corruption here.

I’m going to rebuild this and give that a try. Thankfully it’s mostly script 
with just a few cards and graphics for doing things.

> On Jul 29, 2018, at 1:03 PM, Stephen MacLean via use-livecode 
>  wrote:
> 
> Ok, very strange… I created a test project to run in both 9.0.1 RC1 and 
> 9.0.0… and it works fine, yet doesn’t work in the image that I have in my 
> engine stack in either version.
> 
> Even renaming the old one and dragging a new image out and trying that 
> doesn’t work. Ugh!
> 
> I’m at a loss.
> 
> I’m running business in case that matters.
> 
> Thanks,
> 
> Steve
> 
>> On Jul 29, 2018, at 12:38 PM, Stephen MacLean via use-livecode 
>>  wrote:
>> 
>> HI Klaus,
>> 
>> Wow, ok… I will have to check 9.0.0. Currently using 9.0.1 RC1 on 10.12.6. 
>> It fails for me in both script and the inspector.
>> 
>> Thanks for testing!
>> 
>> Best,
>> 
>> Steve
>> 
>>> On Jul 29, 2018, at 12:34 PM, Klaus major-k via use-livecode 
>>>  wrote:
>>> 
>>> Hi Steve,
>>> 
>>>> Am 29.07.2018 um 18:28 schrieb Stephen MacLean via use-livecode 
>>>> :
>>>> 
>>>> Hi All,
>>>> 
>>>> I’m having an issue with the “set the filename of img”.
>>>> This line: set the filename of img "checkImg" of cd "cropImg" stack 
>>>> "imgEngine" to imgURL
>>>> Works as expected when using “http”. When using “https”, it fails to get 
>>>> the image. No error is returned, but the image is blank.
>>>> https://pixfeeds.com/images/usa-travel/1280-589451788-statue-of-liberty-full-base.jpg
>>>>  
>>>> <https://pixfeeds.com/images/usa-travel/1280-589451788-statue-of-liberty-full-base.jpg>
>>>>  is the test image I’m using. Don’t see any reports of issues, but wanted 
>>>> to know if anyone else has run into this.
>>> 
>>> just tested, works right out of the box in the IDE, by setting the filename 
>>> in the inspector and also via script!
>>> macOS 10.13.6, LC 9
>>> 
>>>> Thanks,
>>>> 
>>>> Steve MacLean
>>> 
>>> Best
>>> 
>>> Klaus
>>> 
>>> --
>>> Klaus Major
>>> http://www.major-k.de
>>> kl...@major-k.de
>>> 
>>> 
>>> ___
>>> 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: set the filename of image bug?

2018-07-29 Thread Stephen MacLean via use-livecode
Ok, very strange… I created a test project to run in both 9.0.1 RC1 and 9.0.0… 
and it works fine, yet doesn’t work in the image that I have in my engine stack 
in either version.

Even renaming the old one and dragging a new image out and trying that doesn’t 
work. Ugh!

I’m at a loss.

I’m running business in case that matters.

Thanks,

Steve

> On Jul 29, 2018, at 12:38 PM, Stephen MacLean via use-livecode 
>  wrote:
> 
> HI Klaus,
> 
> Wow, ok… I will have to check 9.0.0. Currently using 9.0.1 RC1 on 10.12.6. It 
> fails for me in both script and the inspector.
> 
> Thanks for testing!
> 
> Best,
> 
> Steve
> 
>> On Jul 29, 2018, at 12:34 PM, Klaus major-k via use-livecode 
>>  wrote:
>> 
>> Hi Steve,
>> 
>>> Am 29.07.2018 um 18:28 schrieb Stephen MacLean via use-livecode 
>>> :
>>> 
>>> Hi All,
>>> 
>>> I’m having an issue with the “set the filename of img”.
>>> This line: set the filename of img "checkImg" of cd "cropImg" stack 
>>> "imgEngine" to imgURL
>>> Works as expected when using “http”. When using “https”, it fails to get 
>>> the image. No error is returned, but the image is blank.
>>> https://pixfeeds.com/images/usa-travel/1280-589451788-statue-of-liberty-full-base.jpg
>>>  
>>> <https://pixfeeds.com/images/usa-travel/1280-589451788-statue-of-liberty-full-base.jpg>
>>>  is the test image I’m using. Don’t see any reports of issues, but wanted 
>>> to know if anyone else has run into this.
>> 
>> just tested, works right out of the box in the IDE, by setting the filename 
>> in the inspector and also via script!
>> macOS 10.13.6, LC 9
>> 
>>> Thanks,
>>> 
>>> Steve MacLean
>> 
>> Best
>> 
>> Klaus
>> 
>> --
>> Klaus Major
>> http://www.major-k.de
>> kl...@major-k.de
>> 
>> 
>> ___
>> 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: set the filename of image bug?

2018-07-29 Thread Stephen MacLean via use-livecode
HI Klaus,

Wow, ok… I will have to check 9.0.0. Currently using 9.0.1 RC1 on 10.12.6. It 
fails for me in both script and the inspector.

Thanks for testing!

Best,

Steve

> On Jul 29, 2018, at 12:34 PM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Steve,
> 
>> Am 29.07.2018 um 18:28 schrieb Stephen MacLean via use-livecode 
>> :
>> 
>> Hi All,
>> 
>> I’m having an issue with the “set the filename of img”.
>> This line: set the filename of img "checkImg" of cd "cropImg" stack 
>> "imgEngine" to imgURL
>> Works as expected when using “http”. When using “https”, it fails to get the 
>> image. No error is returned, but the image is blank.
>> https://pixfeeds.com/images/usa-travel/1280-589451788-statue-of-liberty-full-base.jpg
>>  
>> <https://pixfeeds.com/images/usa-travel/1280-589451788-statue-of-liberty-full-base.jpg>
>>  is the test image I’m using. Don’t see any reports of issues, but wanted to 
>> know if anyone else has run into this.
> 
> just tested, works right out of the box in the IDE, by setting the filename 
> in the inspector and also via script!
> macOS 10.13.6, LC 9
> 
>> Thanks,
>> 
>> Steve MacLean
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> http://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> 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

set the filename of image bug?

2018-07-29 Thread Stephen MacLean via use-livecode
Hi All,

I’m having an issue with the “set the filename of img”.

This line:

set the filename of img "checkImg" of cd "cropImg" stack "imgEngine" to imgURL


Works as expected when using “http”. When using “https”, it fails to get the 
image. No error is returned, but the image is blank.

https://pixfeeds.com/images/usa-travel/1280-589451788-statue-of-liberty-full-base.jpg
 

 is the test image I’m using.


Don’t see any reports of issues, but wanted to know if anyone else has run into 
this.

Thanks,

Steve MacLean
___
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: Problem saving image for file

2018-07-28 Thread Stephen MacLean via use-livecode
Thanks Mike, I like your code, cleaner, smaller and easier to understand.

And thanks for the explanation… I get it:)

Again, thanks to all who responded!


> On Jul 28, 2018, at 11:02 PM, Mike Bonner via use-livecode 
>  wrote:
> 
> It's just how file systems work.  If the beginning character is / that
> means it starts at the root of the file system.  Since you had already set
> the defaultfolder, and wanted to go relative to there, you would just
> specify the folder name/filename.  Or as I said, pre-pend a dot.   In fact,
> 2 dots .. stands for the next folder towards the root so you can do weird
> things like dir ../../..  which will list the contents of a folder 3 levels
> above the current.
> 
> You also don't need to actually set the defaultfolder, you could do as in
> your example...
> 
> set the itemDelimiter to slash
> get the effective filename of this stack
> put tTempCrop into URL "binfile:" & item 1 to - 2 of it &
> "/tempMedia/testimage.jpg"
> 
> In the case of the above you DO need the slash before tempMedia because
> there is no trailing slash when you get item 1 to -2 of it.  But, item 1 to
> -2 of it is a path starting from the root so you end up with an absolute
> path rather than a relative path.  IE it would be something like
> /home/username/desktop/mystackfolder/tempMedia/testimage.jpg
> 
> 
> 
> On Sat, Jul 28, 2018 at 8:45 PM Stephen MacLean via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Thank you to all who replied!
>> 
>> Adding the “.” solved the problem and the file saved where it was supposed
>> to.
>> 
>> Confusing, because you would think that setting the defaultFolder would
>> allow you to specify the next sub folder like I did… and it’s not
>> mentioned, that I saw, in the docs.
>> 
>> Thanks again!
>> 
>> Steve
>> 
>>> On Jul 28, 2018, at 5:52 PM, Mike Bonner via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> If you use the path /tempMedia that forces it to the root of the
>>> filesystem and if there isn't a folder /tempmedia, it'll fail.  Either
>>> leave off the preceding slash, or prepend it with a . <--(a dot) which
>>> designates the current directory.
>>> 
>>> On Sat, Jul 28, 2018 at 3:40 PM Peter Bogdanoff via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> 
>>>> That is (or use variables for the filename):
>>>>> export image "testimage.jpg"  to file "/tempMedia/testimage.jpg" as
>> JPEG
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> On Jul 28, 2018, at 2:37 PM, Peter Bogdanoff via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> Try using this syntax:
>>>>> export image "tImage"  to file "/tempMedia/testimage.jpg" as JPEG
>>>>> 
>>>>> I think you need binfile to read but not to write.
>>>>> Peter
>>>>> 
>>>>> 
>>>>>> On Jul 28, 2018, at 1:41 PM, Stephen MacLean via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>>>> 
>>>>>> Hi All,
>>>>>> 
>>>>>> Been a long time since I’ve done file work with LC, but I’m having an
>>>> issue saving an image to a file:
>>>>>> 
>>>>>> # set the defaultFolder to the folder containing the stackfile
>>>>>> 
>>>>>> set the itemDelimiter to slash
>>>>>> 
>>>>>> get the effective filename of this stack
>>>>>> 
>>>>>> set the defaultFolder to item 1 to -2 of it
>>>>>> 
>>>>>> put tTempCrop into URL "binfile:/tempMedia/testimage.jpg"
>>>>>> 
>>>>>> 
>>>>>> results in a “Can’t open file” error.
>>>>>> 
>>>>>> Trying to save to a folder called “tempMedia” that is in the same
>>>> directory as the stack.
>>>>>> 
>>>>>> Mac OS 10.12.6, 9.01 RC1 Business.
>>>>>> 
>>>>>> TIA,
>>>>>> 
>>>>>> Steve MacLean
>>>>>> ___
>>>>>> use-livecode mailing list
>>>>>> use-livecode@lists.runrev.com
>>>>>> Please visit this url to s

Re: Problem saving image for file

2018-07-28 Thread Stephen MacLean via use-livecode
Thank you to all who replied! 

Adding the “.” solved the problem and the file saved where it was supposed to.

Confusing, because you would think that setting the defaultFolder would allow 
you to specify the next sub folder like I did… and it’s not mentioned, that I 
saw, in the docs.

Thanks again!

Steve

> On Jul 28, 2018, at 5:52 PM, Mike Bonner via use-livecode 
>  wrote:
> 
> If you use the path /tempMedia that forces it to the root of the
> filesystem and if there isn't a folder /tempmedia, it'll fail.  Either
> leave off the preceding slash, or prepend it with a . <--(a dot) which
> designates the current directory.
> 
> On Sat, Jul 28, 2018 at 3:40 PM Peter Bogdanoff via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> That is (or use variables for the filename):
>>> export image "testimage.jpg"  to file "/tempMedia/testimage.jpg" as JPEG
>> 
>> 
>> 
>> 
>>> On Jul 28, 2018, at 2:37 PM, Peter Bogdanoff via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hi,
>>> 
>>> Try using this syntax:
>>> export image "tImage"  to file "/tempMedia/testimage.jpg" as JPEG
>>> 
>>> I think you need binfile to read but not to write.
>>> Peter
>>> 
>>> 
>>>> On Jul 28, 2018, at 1:41 PM, Stephen MacLean via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> Hi All,
>>>> 
>>>> Been a long time since I’ve done file work with LC, but I’m having an
>> issue saving an image to a file:
>>>> 
>>>> # set the defaultFolder to the folder containing the stackfile
>>>> 
>>>> set the itemDelimiter to slash
>>>> 
>>>> get the effective filename of this stack
>>>> 
>>>> set the defaultFolder to item 1 to -2 of it
>>>> 
>>>> put tTempCrop into URL "binfile:/tempMedia/testimage.jpg"
>>>> 
>>>> 
>>>> results in a “Can’t open file” error.
>>>> 
>>>> Trying to save to a folder called “tempMedia” that is in the same
>> directory as the stack.
>>>> 
>>>> Mac OS 10.12.6, 9.01 RC1 Business.
>>>> 
>>>> TIA,
>>>> 
>>>> Steve MacLean
>>>> ___
>>>> 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



___
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

Problem saving image for file

2018-07-28 Thread Stephen MacLean via use-livecode
Hi All,

Been a long time since I’ve done file work with LC, but I’m having an issue 
saving an image to a file:

# set the defaultFolder to the folder containing the stackfile

set the itemDelimiter to slash

get the effective filename of this stack

set the defaultFolder to item 1 to -2 of it

put tTempCrop into URL "binfile:/tempMedia/testimage.jpg"


results in a “Can’t open file” error.

Trying to save to a folder called “tempMedia” that is in the same directory as 
the stack.

Mac OS 10.12.6, 9.01 RC1 Business.

TIA,

Steve MacLean
___
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: Autocomplete in 9.0.1 RC1

2018-07-20 Thread Stephen MacLean via use-livecode
Thanks Colin, thought I had tried tab as well… lol, guess I hadn’t!

> On Jul 20, 2018, at 4:47 PM, Colin Holgate via use-livecode 
>  wrote:
> 
> I think it’s a convention issue. Normally autocomplete is triggered with the 
> tab key. You can right arrow down the list and then press tab, and it will do 
> the line you were on.
> 
> You could argue that enter/return should work as well, but then you don’t 
> have a way to indicate that you don’t want autocomplete at all, you really 
> wanted to call your handler ‘on moused’.
> 
> 
>> On Jul 20, 2018, at 1:40 PM, Stephen MacLean via use-livecode 
>>  wrote:
>> 
>> Hi All,
>> 
>> Maybe I’m missing something, but Autocomplete in the 9.0.1 RC1 doesn’t seem 
>> to work… I try selecting the appropriate pop up from the list with the right 
>> arrow key, but it doesn’t complete and just stays there.
>> 
>> TIA,
>> 
>> Steve MacLean
>> 
>> 9.0.1 RC1 Business
>> 
>> 
>> 
>> ___
>> 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

Autocomplete in 9.0.1 RC1

2018-07-20 Thread Stephen MacLean via use-livecode
Hi All,

Maybe I’m missing something, but Autocomplete in the 9.0.1 RC1 doesn’t seem to 
work… I try selecting the appropriate pop up from the list with the right arrow 
key, but it doesn’t complete and just stays there.

TIA,

Steve MacLean

9.0.1 RC1 Business



___
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: WordPress REST API's

2018-06-26 Thread Stephen MacLean via use-livecode
Hi Todd,

Thanks for the input… I was able to get it working, as you said, you need an 
oAuth plugin which I got and am able to connect fine.

Didn’t know about postman and will check that out.

 I’ve had good success with the library, just some minor tweaks… working good. 

Will have to check out Node.JS + Angular. For now, we have to use WP to get out 
the door. Going forward later on, could be an option.

I’ll be in touch.

Best,

Steve MacLean

> On Jun 26, 2018, at 11:12 AM, Todd Fabacher via use-livecode 
>  wrote:
> 
>> Hmmm...maybe Todd can chime in on this I asked him a a few months back
>> if it was good and safe to use in production...he said absolutely...so i
>> kinda passed that on.
> 
> 
> Yes, sorry I was a speaking at a conference. Hi Steve, I am happy to help.
> There are several ways to connect to the WP REST API. UN/PW is one and
> OAuth is another. You will need to add a plugin to WP to use the OAuth. I
> will ask the team and get that for you.
> 
> 
> From version 4.7, the REST API ver2.0 is supported inside WP. You will need
> to activate and allow it. I suggest checking the documentation first:
> https://developer.wordpress.org/rest-api/
> 
> What you can also do is use postman to validate that everything is working
> and your server is good to go. This way you can know if it is a server
> issue or the connection issue from LC.
> 
> Our code supports ver 2.0 so it should not be an issue, and we have sites
> that use it. Honestly, we switched to (Node.JS + Anguar) for most web
> development, so we will not be using WP going forward, but we are happy to
> help. You can email me directly tfabac...@gmail.com and I will try to help
> you.
> 
> --Todd
> ___
> 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: WordPress REST API's

2018-06-20 Thread Stephen MacLean via use-livecode
Thanks Tom, appreciate the input!

Best,

Steve

> On Jun 20, 2018, at 4:51 PM, Tom Glod via use-livecode 
>  wrote:
> 
> Hmmm...maybe Todd can chime in on this I asked him a a few months back
> if it was good and safe to use in production...he said absolutely...so i
> kinda passed that on.
> 
> Todd reads the mailing list, but he is super busy. if its critical.
> then maybe try to reach out directly and ask.  He is really good at
> responding to private messages even while busy.
> 
> Best of luck Steve.
> 
> On Wed, Jun 20, 2018 at 4:44 PM, Stephen MacLean via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> HI Todd,
>> 
>> Thanks, I have it and am trying to use it.
>> 
>> Looks like I need an oAuth plug-in for wordpress that allows user
>> credentials as I am running a self hosted site.
>> 
>> The one I’ve found so far that finally is giving me results is WP OAuth
>> Server… but to get the user credentials, you need the paid version.
>> 
>> Still wondering if this was in the LC Connect stuff that I contributed
>> awhile back;)
>> 
>> Best,
>> 
>> Steve
>> 
>>> On Jun 20, 2018, at 4:32 PM, Tom Glod via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hey. You can find it on github. DP use it for their work. So it
>> worksI
>>> was planning on using it on a project, but it fell through so I haven't
>>> needed it yet.
>>> 
>>> https://github.com/digitalpomegranate/livecode-wp-restapi
>>> 
>>> This is a well written library.
>>> 
>>> On Wed, Jun 20, 2018 at 3:56 PM, Stephen MacLean via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> 
>>>> Hi All,
>>>> 
>>>> Trying to get an update on the WordPress REST API’s… Was this coming in
>>>> with LiveCode Connect? or something else?
>>>> 
>>>> Also, does anyone have any experience successfully using Digital
>>>> Pomegranates’s WPRestAPI? I am unsure of the authentication used and
>>>> nothing seems to work.
>>>> 
>>>> Any help is appreciated!
>>>> 
>>>> Thanks,
>>>> 
>>>> Steve MacLean
>>>> 
>>>> 
>>>> 
>>>> ___
>>>> 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



___
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: WordPress REST API's

2018-06-20 Thread Stephen MacLean via use-livecode
HI Todd,

Thanks, I have it and am trying to use it.

Looks like I need an oAuth plug-in for wordpress that allows user credentials 
as I am running a self hosted site.

The one I’ve found so far that finally is giving me results is WP OAuth Server… 
but to get the user credentials, you need the paid version.

Still wondering if this was in the LC Connect stuff that I contributed awhile 
back;)

Best,

Steve

> On Jun 20, 2018, at 4:32 PM, Tom Glod via use-livecode 
>  wrote:
> 
> Hey. You can find it on github. DP use it for their work. So it worksI
> was planning on using it on a project, but it fell through so I haven't
> needed it yet.
> 
> https://github.com/digitalpomegranate/livecode-wp-restapi
> 
> This is a well written library.
> 
> On Wed, Jun 20, 2018 at 3:56 PM, Stephen MacLean via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Hi All,
>> 
>> Trying to get an update on the WordPress REST API’s… Was this coming in
>> with LiveCode Connect? or something else?
>> 
>> Also, does anyone have any experience successfully using Digital
>> Pomegranates’s WPRestAPI? I am unsure of the authentication used and
>> nothing seems to work.
>> 
>> Any help is appreciated!
>> 
>> Thanks,
>> 
>> Steve MacLean
>> 
>> 
>> 
>> ___
>> 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

WordPress REST API's

2018-06-20 Thread Stephen MacLean via use-livecode
Hi All,

Trying to get an update on the WordPress REST API’s… Was this coming in with 
LiveCode Connect? or something else?

Also, does anyone have any experience successfully using Digital Pomegranates’s 
WPRestAPI? I am unsure of the authentication used and nothing seems to work.

Any help is appreciated!

Thanks,

Steve MacLean



___
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: macOS 10.13 and xCode 9 compatibility?

2017-09-28 Thread Stephen MacLean via use-livecode
Thanks Panos!

> On Sep 28, 2017, at 10:04 AM, panagiotis merakos via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi Steve,
> 
> Yes, that support will be rolled into the next DP release of 8.2 and 9.0 as
> well.
> 
> Regarding macOS High Sierra, I had installed one of its betas in a
> partition, and I did not notice any issues.
> 
> I think several community members use 10.13 and have no issues so far.
> 
> Best regards,
> Panos
> --
> 
> On Thu, Sep 28, 2017 at 1:48 PM, Stephen MacLean via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Hi Panos,
>> 
>> Thanks for the quick reply! I take it that support will be rolled into the
>> next DP release of 9.0 as well?
>> 
>> Note to all, keep a copy of xCode 8.x and rename it before updating to
>> xCode 9.
>> 
>> Any word on macOS 10.13? Anyone have issues with AFPS?
>> 
>> Best,
>> 
>> Steve MacLean
>> 
>>> On Sep 28, 2017, at 8:21 AM, panagiotis merakos via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hi Stephen,
>>> 
>>> No, support for Xcode9 has not been added yet. We have a pending PR for
>>> that, so it will appear in the next 8.1.7 RC2 release.
>>> 
>>> Important note: You do NOT need to rebuild your apps with xcode 9 if you
>>> want them to run on iOS 11. This will happen seamlessly (remember that in
>>> the standalone settings, you choose e.g. "iOS 9.3 or later").
>>> 
>>> https://forums.livecode.com/viewtopic.php?f=49=29783
>>> https://forums.livecode.com/viewtopic.php?f=49=29779
>>> 
>>> Best,
>>> Panos
>>> --
>>> 
>>> On Thu, Sep 28, 2017 at 1:14 PM, Stephen MacLean via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> 
>>>> Hi All,
>>>> 
>>>> Just checking on macOS 10.13 and xCode 9 compatibility… Anyone run into
>>>> any issues with 10.13 and AFPS? Has LC been updated for compatibility
>> with
>>>> xCode 9?
>>>> 
>>>> TIA,
>>>> 
>>>> Steve MacLean
>>>> 
>>>> 
>>>> 
>>>> 
>>>> ___
>>>> 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



___
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: macOS 10.13 and xCode 9 compatibility?

2017-09-28 Thread Stephen MacLean via use-livecode
Hi Panos,

Thanks for the quick reply! I take it that support will be rolled into the next 
DP release of 9.0 as well?

Note to all, keep a copy of xCode 8.x and rename it before updating to xCode 9.

Any word on macOS 10.13? Anyone have issues with AFPS?

Best,

Steve MacLean

> On Sep 28, 2017, at 8:21 AM, panagiotis merakos via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi Stephen,
> 
> No, support for Xcode9 has not been added yet. We have a pending PR for
> that, so it will appear in the next 8.1.7 RC2 release.
> 
> Important note: You do NOT need to rebuild your apps with xcode 9 if you
> want them to run on iOS 11. This will happen seamlessly (remember that in
> the standalone settings, you choose e.g. "iOS 9.3 or later").
> 
> https://forums.livecode.com/viewtopic.php?f=49=29783
> https://forums.livecode.com/viewtopic.php?f=49=29779
> 
> Best,
> Panos
> --
> 
> On Thu, Sep 28, 2017 at 1:14 PM, Stephen MacLean via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Hi All,
>> 
>> Just checking on macOS 10.13 and xCode 9 compatibility… Anyone run into
>> any issues with 10.13 and AFPS? Has LC been updated for compatibility with
>> xCode 9?
>> 
>> TIA,
>> 
>> Steve MacLean
>> 
>> 
>> 
>> 
>> ___
>> 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

macOS 10.13 and xCode 9 compatibility?

2017-09-28 Thread Stephen MacLean via use-livecode
Hi All,

Just checking on macOS 10.13 and xCode 9 compatibility… Anyone run into any 
issues with 10.13 and AFPS? Has LC been updated for compatibility with xCode 9?

TIA,

Steve MacLean




___
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: Phone Number Validation Function

2017-09-11 Thread Stephen MacLean via use-livecode
Hi Bob,

Last year I released a sample library for base functions like this:

https://github.com/renegadesteve/rsIsValid 


You can use the LCS version, or build a widget library for your version of LC 9.

It does use RegEx, but you can Sean said, there are many ways to do what you 
are looking to do.

Since it seems that you are looking for consistency across you app, however you 
get there, it can be done in multiple ways. RegEx is a valid way to do.

As always, YMMV.

Best,

Steve MacLean

> On Sep 11, 2017, at 6:48 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Thanks Sean, but reading through that article, I think it makes the arguement 
> for NOT using RegEx, seeing all the arguments back and forth about what is 
> wrong with each other's regex, and one guy pooh poohing all of them in favor 
> of a procedural approach. 
> 
> My goal is not to simply allow certain characters and numbers (I have a 
> function that does that already) of a given length, but to enforce data 
> consistency across my apps. That means that while certain numbers are 
> acceptably formatted phone numbers according to some international standard, 
> having +1 at the beginning for example, I don't necessarily want that. 
> Periods are valid delimiters, but I don't want that either. 
> 
> Now the google api looks promising, but if I have to tie it to a google 
> account and active internet connection, I will probably stick to rolling my 
> own. 
> 
> Bob S
> 
> 
>> On Sep 11, 2017, at 15:33 , Sean Cole (Pi) via use-livecode 
>>  wrote:
>> 
>> Read this:
>> https://stackoverflow.com/questions/123559/a-comprehensive-regex-for-phone-number-validation
>> 
>> You can then filter by these Regular Expressions (RegEx) really simply.
>> More importantly, it is one or two lines of code instead of 53.
>> 
>> Sean Cole
> 
> 
> ___
> 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


Android Security (was Re: Sending a message to users that floats above everything)

2017-08-24 Thread Stephen MacLean via use-livecode

> On Aug 24, 2017, at 3:14 AM, J. Landman Gay via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> On 8/24/17 12:22 AM, Stephen MacLean via use-livecode wrote:
>> My point was that unfortunately that only means ~15% of currently active 
>> Android devices are fairly safe and Bob’s comment, while brief, was fair as 
>> far as it was concerned. Once Android hits iOS’s ~85% active devices on 
>> latest version of the os, then it wouldn’t be. I just don’t think that will 
>> happen anytime soon because of the way the OS is rolled out through 3rd 
>> parties for the most part.
> 
> Actually, I was trying to make the opposite point -- Google Play Services is 
> now on (at least) 93% of all Android devices. It runs on any Android 
> regardless of manufacturer or customized OS, provided the device is 
> authorized to access the Google Play Store. It's had over 5 billion downloads 
> and is, among other things, the security layer.
> 
> https://www.androidcentral.com/genius-google-play-services
> 
> It isn't only the "Google-made" phones that are protected, it's almost all of 
> them now.
> 


I think it’s important to understand exactly what Google Play Services is and 
isn’t. 

It provides a base API, like Windows .NET, that runs on a variety of Android 
versions giving developers something common to develop against. Google Play 
Services can and does update those API’s and also updates Google Apps and 
components such as WebKit. It also provides malware scanning and blocking 
similar to Windows Defender, i.e. it is a layer of security

It does NOT provide core OS security updates. Those are, except for Google’s 
Pixel and Nexus, incorporated and provided by the manufacturer as a patch level 
update to the OS. It is not THE security layer for Android, just a part of it. 

So while 93% of Android devices have a layer of protection, it would be like 
saying Windows XP or Mac OS X 10.6 or even unpatched Widows 10 or macOS are 
“protected” because they have a malware scanner/blocker running. Sure, it may 
blunt some/most of it, but they are still vulnerable. 

At least with Google Play Services you get updates to some API components like 
WebKit, although that only starts with Android 5.0. You don’t get that on iOS.

Also, just like other OS vendors, it’s rolling support. 4.4 is the last 
supported version for Google Play and Google warns that will change as newer 
versions come out.

See https://source.android.com/security/overview/updates-resources 
<https://source.android.com/security/overview/updates-resources> and 
https://source.android.com/security/bulletin/ 
<https://source.android.com/security/bulletin/> for more details.

Sorry, this is getting long winded and probably pointless. To me, this isn’t 
about OS vs OS. You aren’t safe/secure/protected if you don’t fix the 
underlying problem.

Best,

Steve MacLean


___
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: is IMAP or POP3 supported with tsNet?

2017-08-24 Thread Stephen MacLean via use-livecode
Thanks Charles, looking forward to those docs when done.

Best,

Steve MacLean

> On Aug 24, 2017, at 6:05 AM, Charles Warwick via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> 
> On 24/08/2017 6:40 AM, Monte Goulding via use-livecode wrote:
>>> On 24 Aug 2017, at 1:06 am, Stephen MacLean via use-livecode 
>>> <use-livecode@lists.runrev.com> wrote:
>>> 
>>> Don’t think it is, based on what’s in the dictionary, but thought I would 
>>> ask: is IMAP or POP3 supported with tsNet?
>>> 
>>> I know CURL does, but don’t know if it’s been added to tsNet.
>> Short answer yes. Long answer Charles is going to write some docs or a demo 
>> to explain how to do it. Not sure on the ETA of that.
> 
> IMAP and POP3 support in tsNet under Linux is only available in tsNet 1.3.0+ 
> which will be bundled with the next LC release.
> 
> All other platforms have had support for those protocols for a while.  I hope 
> to have some documentation available in the next two weeks.
> 
> Regards,
> 
> Charles
> 
> 
> ___
> 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: Sending a message to users that floats above everything

2017-08-23 Thread Stephen MacLean via use-livecode

> On Aug 24, 2017, at 12:00 AM, J. Landman Gay via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> On 8/23/17 10:27 PM, Stephen MacLean via use-livecode wrote:
>> Only about ~15% of Android devices are at anywhere near a recent patch level 
>> or current OS version.
>> Android, locked down like iOS (store only apps, current OS version, no - 
>> cheap knock offs, stock only OS, etc, etc.) may be close to be being as 
>> safe, but you’ve just removed the majority of Android devices from the 
>> equation. Now look at market share, and it’s a totally different percentage. 
>> Remember, stock Android is only available on a Google “made" device. All 
>> others have a manufacturers version of Android, that may not even be the 
>> latest version of Android and/or with features that may open security holes.
> 
> Very true. Google knows about this and that's why it now puts Google Play 
> Services on every device, which is the app that manages security among other 
> things. That doesn't mean that manufacturers can't punch holes in the OS, but 
> Google is now scanning and managing security for all devices that can access 
> the Play Store. It updates in the background much as OS X does.
> 
> I suspect the list is getting tired of this discussion so I'll stop, but the 
> main point I think Richard and I are trying to make is a response to Bob's 
> original comment -- that Android is as safe or safer than iOS, so security 
> concerns aren't a good reason to dismiss this very competent OS.
> 

Thank you for your comments and I do agree, the current version of stock 
Android is around as safe as the current version of iOS.

My point was that unfortunately that only means ~15% of currently active 
Android devices are fairly safe and Bob’s comment, while brief, was fair as far 
as it was concerned. Once Android hits iOS’s ~85% active devices on latest 
version of the os, then it wouldn’t be. I just don’t think that will happen 
anytime soon because of the way the OS is rolled out through 3rd parties for 
the most part.

While I don’t like Google having the ability to access my device, remove 
software and manage my security, it’s a huge leap forward for the Android world 
and much better than the way it was.

Regardless, I’m not advocating for one or the other. And I don’t think anyone 
should dismiss Android, Oreo is better than “very competent” :)

Best,

Steve MacLean



___
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: Sending a message to users that floats above everything

2017-08-23 Thread Stephen MacLean via use-livecode

> On Aug 23, 2017, at 4:23 PM, Richard Gaskin via use-livecode 
>  wrote:
> 
> J. Landman Gay wrote:
> 
> > On 8/23/17 9:46 AM, Bob Sneidar via use-livecode wrote:
> >> But the reason there are more attacks against Android is simple.
> >> It's orders of magnitude easier to exploit.
> >
> > Very true. But the actual percentage of Android users who contract
> > malware is less than 1% (0.01 sticks in my memory.) And almost all of
> > those users are downloading apps from non-authorized sources. If you
> > stick to Google Play and Amazon you're as safe as iOS. Those stores
> > vet their apps much as Apple does.
> >
> > If it helps, Android scans your device regularly and removes malware
> > even if the app was downloaded from an unauthorized source.
> >
> > Avoid the cheap Chinese knock-offs that ship without Google's
> > software.
> > Those are the dangerous phones.
> 
> Amen, sister.  The only part I take exception with is the "orders of 
> magnitude":
> 
> There are probably orders of magnitude more malware available, roughly 
> proportionate to the much larger audience size.
> 
> But an ATTEMPT is not an EXPLOIT.
> 
> Like anything else in life, simply trying to do something is no guarantee 
> it'll be successful.
> 
> Once we exclude jailbroken devices, not-real-Android knockoffs, and anything 
> else where either the user or the maker went out of their way to thwart the 
> protections built into the OS, the rate of actual exploits is very low on 
> both OSes, and not really all that different proportionate to market share.
> 
> Stock Android is safer than just about any desktop OS, including macOS.
> 
> Most headlines discuss lab discoveries of things that may or may not actually 
> even be in the wild.  Among the subset that are in the wild, if exploits are 
> found they're usually in PRC or other markets where 
> not-Google-Android/merely-Android-compatible devices are sold.


I agree...
> 
> Whether the messaging is coming from marketing execs or geopolitical active 
> measures, it's really helpful to read past the headlines and discern the 
> relevant details.


Only about ~15% of Android devices are at anywhere near a recent patch level or 
current OS version.

Android, locked down like iOS (store only apps, current OS version, no - cheap 
knock offs, stock only OS, etc, etc.) may be close to be being as safe, but 
you’ve just removed the majority of Android devices from the equation. Now look 
at market share, and it’s a totally different percentage. Remember, stock 
Android is only available on a Google “made" device. All others have a 
manufacturers version of Android, that may not even be the latest version of 
Android and/or with features that may open security holes.

However, you can’t just ignore all those devices, because they are out there 
being used every day. They are also being targeted, attacked and exploited just 
like those that still use Windows XP, earlier versions of Mac OS X, iOS and 
other out of date, un-supported, un-securable OSes.

The very latest version of Android, just announced, made MANY important 
advances in security and is much, much more secure. However, since the majority 
of Android devices out there will never, ever see it installed, it still leaves 
a bunch of gapping security holes.

With that said, I’m happy that all the major OS players are making huge strides 
in security… it’s been far too long in coming. It’s too important, no matter 
what flavor of OS you use or like.

The problem still remains for any OS, desktop, server or mobile… if the user 
steps outside the box, they open themselves up. This has been an issue since 
the floppy disk and sneaker net… and won’t likely change. Just think Adobe 
Flash and that even a huge software company like Adobe couldn’t make it secure 
and is discontinuing it.

The difference here, on this list, is that most folks are professionals or at 
least highly knowledgeable end users that know what to look for, what not to do 
and what’s safe to get their devices looking and running the way they want. 
They know what trade offs can be made and still stay secure.

Since this is about security, I would suggest to all that if you haven’t done 
so already, you sign-up for alerts from CERT, the US Computer Emergency 
Readiness Team. https://www.us-cert.gov/ncas. There was a good one sent today 
about North Korea’s DDoS botnet and ransomeware.

Whatever OS you use, develop on/for or just plain love, be safe.

Best,

Steve MacLean



___
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: is IMAP or POP3 supported with tsNet?

2017-08-23 Thread Stephen MacLean via use-livecode
Thanks Monte, great to hear!! Looking forward to it. 

Best,

Steve MacLean

> On Aug 23, 2017, at 4:40 PM, Monte Goulding via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> 
>> On 24 Aug 2017, at 1:06 am, Stephen MacLean via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Don’t think it is, based on what’s in the dictionary, but thought I would 
>> ask: is IMAP or POP3 supported with tsNet?
>> 
>> I know CURL does, but don’t know if it’s been added to tsNet.
> 
> Short answer yes. Long answer Charles is going to write some docs or a demo 
> to explain how to do it. Not sure on the ETA of that.
> 
> Cheers
> 
> Monte
> ___
> 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: Thoughts on BLOBs in SQLite

2017-08-23 Thread Stephen MacLean via use-livecode
Hi Glen,

First, as Richard G. mention, internet wars have been fought over this issue… 
to me it’s your choice.

I’ve done both and both have their ups and downs.

For mobile, I’ve sided with keeping it in the DB. It keeps everything together 
and the way I’m querying the DB, I’m already pulling the data and the image 
just comes along with it. My experience is that it’s very fast.

As does Jonathan L, I store my images as base64 encoded so they can be 
transmitted over the internet as needed and decode them on the fly when needed 
by the app. The added benefit is you can store them in a TXT field in SQLite. 
LC is very fast at decoding them.

As for growing in size, especially for mobile, something is going to grow 
either way… wether it’s the files on the file system or the DB file, as you 
add, it’s going to grow.

Sorry, I don’t have anything resembling a example stack to share, but in 
keeping the above in mind, it’s not too hard to implement.

HTH,

Steve MacLean

 
> On Aug 23, 2017, at 12:11 PM, Glen Bojsza via use-livecode 
>  wrote:
> 
> Hello,
> 
> I was looking for feedback on whether it is better to store images as BLOBs
> in an SQLite database for a LC app or store paths to the images in the
> SQLite database and the images in a separate folder.
> 
> Any help in understanding possible performance and memory issues is what I
> am looking for.
> 
> Can I assume that any issues would be the same for both Android and iOS?
> 
> thanks,
> 
> Glen
> ___
> 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

is IMAP or POP3 supported with tsNet?

2017-08-23 Thread Stephen MacLean via use-livecode
Hi All,

Don’t think it is, based on what’s in the dictionary, but thought I would ask: 
is IMAP or POP3 supported with tsNet?

I know CURL does, but don’t know if it’s been added to tsNet.

TIA,

Steve MacLean





___
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: SFTP with .PPK file

2017-03-20 Thread Stephen MacLean via use-livecode
Hi Charles,

Thank you so much, that did the trick!!!

Best Regards,

Steve MacLean

> On Mar 18, 2017, at 4:05 AM, Charles Warwick via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi Steve,
> 
> Ahh... it's been a while since I wrote the SSH component of tsNet and I've 
> been unfortunately relying on the documentation I wrote when checking your 
> code!
> 
> tSettings["ssh_private_key"] must provide the "path" to the private key, not 
> the contents of the private key (another documentation issue for me to fix!).
> 
> So your code should actually look like
> 
> on mouseUp
>  local tHeaders, tResult, tSettings
>  put “" into tSettings["username"]
>  put "D:\private.ppk" into tSettings["ssh_private_key"]
>  tsNetInit
>  put tsNetGet("1", "sftp://secure..us/;, tHeaders, 
> "transferComplete", tSettings) into tResult
> end mouseUp
> 
> Hopefully that will get it working for you!
> 
> Cheers,
> 
> Charles
> 
> On 17/03/2017 11:36 PM, Stephen MacLean via use-livecode wrote:
>> Hi Charles,
>> 
>> Again, thank you for all your help!!
>> 
>> I made the change below, and indeed didn’t get the error any more. However, 
>> I still wasn’t getting anything returned.
>> 
>> I ran your debug stack along side it and got this:
>> 
>> Hostname in DNS cache was stale, zapped
>>   Trying xx.xx.xx.xx...
>> TCP_NODELAY set
>> Connected to secure.xx.us (xx.xx.xx.xx) port 22 (#3)
>> SSH MD5 fingerprint: 
>> SSH authentication methods available: publickey
>> Using SSH private key file '-BEGIN RSA PRIVATE KEY——
>> 
>> -END RSA PRIVATE KEY-
>> '
>> SSH public key authentication failed: Unable to extract public key from 
>> private key file: Unable to open private key file
>> 
>> Not sure about were to go from here… I redid the export of the .ppk in 
>> PuttyGen and still get the same thing. There is no password protecting the 
>> key.
>> 
>> Any further help would be greatly appreciated.
>> 
>> Best Regards,
>> 
>> Steve MacLean
>> 
>>> On Mar 17, 2017, at 5:04 AM, Charles Warwick via use-livecode 
>>> <use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hi Steve,
>>> 
>>> My apologies... there is a mistake in the documentation for tsNet which I 
>>> only just noticed.
>>> 
>>> The array element for the SSH private key should be 
>>> tSettings["ssh_private_key"], not tSettings["ssh_priv_key"].
>>> 
>>> So if you change the following line:
>>> 
>>>put tPrivKey into tSettings["ssh_priv_key"]
>>> 
>>> to:
>>> 
>>>put tPrivKey into tSettings["ssh_private_key"]
>>> 
>>> you should be right to go!
>>> 
>>> (I will get this fixed in the documentation for the next version)
>>> 
>>> Best Regards,
>>> 
>>> Charles
>>> 
>>> 
>>> On 17/03/2017 6:31 PM, Charles Warwick via use-livecode wrote:
>>>> Hi Steve,
>>>> 
>>>> The tsNet command only requires the SSH private key, so that is ok.
>>>> 
>>>> I will test again here to make sure there is nothing else going on in LC 
>>>> 9.0 DP6
>>>> 
>>>> Just to check though, I assume your private key does not require a 
>>>> passphrase?
>>>> 
>>>> Another thing to try is to download the following simple stack:
>>>> 
>>>> https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode
>>>> 
>>>> Run that stack at the same time as your own, and click "Start Debug" 
>>>> before you try make the SSH connection.
>>>> 
>>>> It should provide some additional debug information that may shed more 
>>>> light on what is actually happening.
>>>> 
>>>> Regards,
>>>> 
>>>> Charles
>>>> 
>>>> 
>>>> On 16/03/2017 10:24 PM, Stephen MacLean via use-livecode wrote:
>>>>> Hi Charles,
>>>>> 
>>>>> One other thing… in looking at the .ppk file, it contains both “public 
>>>>> lines”  and "private lines”. All I see in the ssh key file is private.
>>>>> 
>>>>> Not sure that make any difference, but thought I’d mention it.
>>>>> 
>>>>&g

Re: SFTP with .PPK file

2017-03-17 Thread Stephen MacLean via use-livecode
Hi Charles,

Again, thank you for all your help!!

I made the change below, and indeed didn’t get the error any more. However, I 
still wasn’t getting anything returned.

I ran your debug stack along side it and got this:

Hostname in DNS cache was stale, zapped
  Trying xx.xx.xx.xx...
TCP_NODELAY set
Connected to secure.xx.us (xx.xx.xx.xx) port 22 (#3)
SSH MD5 fingerprint: 
SSH authentication methods available: publickey
Using SSH private key file '-BEGIN RSA PRIVATE KEY——

-END RSA PRIVATE KEY-
'
SSH public key authentication failed: Unable to extract public key from private 
key file: Unable to open private key file

Not sure about were to go from here… I redid the export of the .ppk in PuttyGen 
and still get the same thing. There is no password protecting the key.

Any further help would be greatly appreciated.

Best Regards,

Steve MacLean

> On Mar 17, 2017, at 5:04 AM, Charles Warwick via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi Steve,
> 
> My apologies... there is a mistake in the documentation for tsNet which I 
> only just noticed.
> 
> The array element for the SSH private key should be 
> tSettings["ssh_private_key"], not tSettings["ssh_priv_key"].
> 
> So if you change the following line:
> 
>put tPrivKey into tSettings["ssh_priv_key"]
> 
> to:
> 
>put tPrivKey into tSettings["ssh_private_key"]
> 
> you should be right to go!
> 
> (I will get this fixed in the documentation for the next version)
> 
> Best Regards,
> 
> Charles
> 
> 
> On 17/03/2017 6:31 PM, Charles Warwick via use-livecode wrote:
>> Hi Steve,
>> 
>> The tsNet command only requires the SSH private key, so that is ok.
>> 
>> I will test again here to make sure there is nothing else going on in LC 9.0 
>> DP6
>> 
>> Just to check though, I assume your private key does not require a 
>> passphrase?
>> 
>> Another thing to try is to download the following simple stack:
>> 
>> https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode
>> 
>> Run that stack at the same time as your own, and click "Start Debug" before 
>> you try make the SSH connection.
>> 
>> It should provide some additional debug information that may shed more light 
>> on what is actually happening.
>> 
>> Regards,
>> 
>> Charles
>> 
>> 
>> On 16/03/2017 10:24 PM, Stephen MacLean via use-livecode wrote:
>>> Hi Charles,
>>> 
>>> One other thing… in looking at the .ppk file, it contains both “public 
>>> lines”  and "private lines”. All I see in the ssh key file is private.
>>> 
>>> Not sure that make any difference, but thought I’d mention it.
>>> 
>>> Best,
>>> 
>>> Steve
>>> 
>>>> On Mar 16, 2017, at 7:53 AM, Stephen MacLean via use-livecode 
>>>> <use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> Hi Charles,
>>>> 
>>>> Thank you so much for reply!
>>>> 
>>>> I converted the key file as you described, however, I’m still getting the 
>>>> error 67 (authentication error) when running the script.
>>>> 
>>>> Any further help would be greatly appreciated.
>>>> 
>>>> Best,
>>>> 
>>>> Steve MacLean
>>>> 
>>>>> On Mar 16, 2017, at 3:08 AM, Charles Warwick via use-livecode 
>>>>> <use-livecode@lists.runrev.com> wrote:
>>>>> 
>>>>> Hi Steve,
>>>>> 
>>>>> It looks like you are using a SSH private key in PuTTY format (.ppk).  
>>>>> tsNet requires it to be in OpenSSH format.
>>>>> 
>>>>> That is easy to fix though, you can convert the .ppk with PuttyGen.
>>>>> 
>>>>> To do this, open PuttyGen and load the .ppk file.  Then select 
>>>>> "Conversions" -> "Export OpenSSH key".
>>>>> 
>>>>> Apart from that, just make sure that your call to tsNetGet includes the 
>>>>> full path of the file you want to download.
>>>>> 
>>>>> Hope that helps,
>>>>> 
>>>>> Cheers,
>>>>> 
>>>>> Charles
>>>>> 
>>>>> 
>>>>> On 16/03/2017 6:01 AM, Stephen MacLean via use-livecode wrote:
>>>>>> Well, still no luck in getting it to work, but getting closer…
>>>>>> 
>>>>>

Re: SFTP with .PPK file

2017-03-16 Thread Stephen MacLean via use-livecode
Hi Charles, 

One other thing… in looking at the .ppk file, it contains both “public lines”  
and "private lines”. All I see in the ssh key file is private.

Not sure that make any difference, but thought I’d mention it.

Best,

Steve

> On Mar 16, 2017, at 7:53 AM, Stephen MacLean via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi Charles,
> 
> Thank you so much for reply!
> 
> I converted the key file as you described, however, I’m still getting the 
> error 67 (authentication error) when running the script.
> 
> Any further help would be greatly appreciated.
> 
> Best,
> 
> Steve MacLean
> 
>> On Mar 16, 2017, at 3:08 AM, Charles Warwick via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Hi Steve,
>> 
>> It looks like you are using a SSH private key in PuTTY format (.ppk).  tsNet 
>> requires it to be in OpenSSH format.
>> 
>> That is easy to fix though, you can convert the .ppk with PuttyGen.
>> 
>> To do this, open PuttyGen and load the .ppk file.  Then select "Conversions" 
>> -> "Export OpenSSH key".
>> 
>> Apart from that, just make sure that your call to tsNetGet includes the full 
>> path of the file you want to download.
>> 
>> Hope that helps,
>> 
>> Cheers,
>> 
>> Charles
>> 
>> 
>> On 16/03/2017 6:01 AM, Stephen MacLean via use-livecode wrote:
>>> Well, still no luck in getting it to work, but getting closer…
>>> 
>>> I found a sample file linked to on livecode.com <http://livecode.com/>. 
>>> Modifying it to use the key file, I have:
>>> 
>>> on mouseUp
>>>   local tHeaders, tResult, tSettings
>>>   put “" into tSettings["username"]
>>>   put URL "binfile:D:\private.ppk" into tPrivKey
>>>   put tPrivKey into tSettings["ssh_priv_key"]
>>>   tsNetInit
>>>   put tsNetGet("1", "sftp://secure.xxxxxxxx.us/;, tHeaders, 
>>> "transferComplete", tSettings) into tResult
>>> end mouseUp
>>> 
>>> However, it returns:
>>> 
>>> tsneterr: (67) Authentication failure
>>> 
>>> Again, I can access the sftp site with no problems using the WinSCP ftp 
>>> client and the key file.
>>> 
>>> Any suggestions??
>>> 
>>> Thanks,
>>> 
>>> Steve MacLean
>>> 
>>>> On Mar 15, 2017, at 9:38 AM, Stephen MacLean via use-livecode 
>>>> <use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> Hi All,
>>>> 
>>>> Looking to use tsNet to connect to a SFTP server that uses username and a 
>>>> private key instead of a password. The private key is contained in a file.
>>>> 
>>>> I use WinSCP and can link the connection to the file and can connect fine.
>>>> 
>>>> In LC, I’ve set the CABundle to the file, but am not sure this is how it’s 
>>>> supposed to work. Getting an auth error when doing tsNetGet.
>>>> 
>>>> Any help would be appreciated.
>>>> 
>>>> Thanks,
>>>> 
>>>> Steve MacLean
>>>> 
>>>> PS: Running 9.0 dp6 Business
>>>> 
>>>> ___
>>>> 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



___
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: SFTP with .PPK file

2017-03-16 Thread Stephen MacLean via use-livecode
Hi Charles,

Thank you so much for reply!

I converted the key file as you described, however, I’m still getting the error 
67 (authentication error) when running the script.

Any further help would be greatly appreciated.

Best,

Steve MacLean

> On Mar 16, 2017, at 3:08 AM, Charles Warwick via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi Steve,
> 
> It looks like you are using a SSH private key in PuTTY format (.ppk).  tsNet 
> requires it to be in OpenSSH format.
> 
> That is easy to fix though, you can convert the .ppk with PuttyGen.
> 
> To do this, open PuttyGen and load the .ppk file.  Then select "Conversions" 
> -> "Export OpenSSH key".
> 
> Apart from that, just make sure that your call to tsNetGet includes the full 
> path of the file you want to download.
> 
> Hope that helps,
> 
> Cheers,
> 
> Charles
> 
> 
> On 16/03/2017 6:01 AM, Stephen MacLean via use-livecode wrote:
>> Well, still no luck in getting it to work, but getting closer…
>> 
>> I found a sample file linked to on livecode.com <http://livecode.com/>. 
>> Modifying it to use the key file, I have:
>> 
>> on mouseUp
>>local tHeaders, tResult, tSettings
>>put “" into tSettings["username"]
>>put URL "binfile:D:\private.ppk" into tPrivKey
>>put tPrivKey into tSettings["ssh_priv_key"]
>>tsNetInit
>>put tsNetGet("1", "sftp://secure..us/;, tHeaders, 
>> "transferComplete", tSettings) into tResult
>> end mouseUp
>> 
>> However, it returns:
>> 
>>  tsneterr: (67) Authentication failure
>> 
>> Again, I can access the sftp site with no problems using the WinSCP ftp 
>> client and the key file.
>> 
>> Any suggestions??
>> 
>> Thanks,
>> 
>> Steve MacLean
>> 
>>> On Mar 15, 2017, at 9:38 AM, Stephen MacLean via use-livecode 
>>> <use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hi All,
>>> 
>>> Looking to use tsNet to connect to a SFTP server that uses username and a 
>>> private key instead of a password. The private key is contained in a file.
>>> 
>>> I use WinSCP and can link the connection to the file and can connect fine.
>>> 
>>> In LC, I’ve set the CABundle to the file, but am not sure this is how it’s 
>>> supposed to work. Getting an auth error when doing tsNetGet.
>>> 
>>> Any help would be appreciated.
>>> 
>>> Thanks,
>>> 
>>> Steve MacLean
>>> 
>>> PS: Running 9.0 dp6 Business
>>> 
>>> ___
>>> 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: Help test please? GoLiveNet in v9

2017-03-15 Thread Stephen MacLean via use-livecode
Works fine in LC 8.13 and 9.0 DP6 Business on Windows 7 x64 and Mac OS X 10.12.3

Best,

Steve MacLean

___
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: SFTP with .PPK file

2017-03-15 Thread Stephen MacLean via use-livecode
Well, still no luck in getting it to work, but getting closer…

I found a sample file linked to on livecode.com <http://livecode.com/>. 
Modifying it to use the key file, I have:

on mouseUp
   local tHeaders, tResult, tSettings
   put “" into tSettings["username"]
   put URL "binfile:D:\private.ppk" into tPrivKey
   put tPrivKey into tSettings["ssh_priv_key"]
   tsNetInit
   put tsNetGet("1", "sftp://secure..us/;, tHeaders, 
"transferComplete", tSettings) into tResult
end mouseUp

However, it returns:

 tsneterr: (67) Authentication failure

Again, I can access the sftp site with no problems using the WinSCP ftp client 
and the key file.

Any suggestions??

Thanks,

Steve MacLean

> On Mar 15, 2017, at 9:38 AM, Stephen MacLean via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi All,
> 
> Looking to use tsNet to connect to a SFTP server that uses username and a 
> private key instead of a password. The private key is contained in a file.
> 
> I use WinSCP and can link the connection to the file and can connect fine.
> 
> In LC, I’ve set the CABundle to the file, but am not sure this is how it’s 
> supposed to work. Getting an auth error when doing tsNetGet.
> 
> Any help would be appreciated.
> 
> Thanks,
> 
> Steve MacLean
> 
> PS: Running 9.0 dp6 Business
> 
> ___
> 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

SFTP with .PPK file

2017-03-15 Thread Stephen MacLean via use-livecode
Hi All,

Looking to use tsNet to connect to a SFTP server that uses username and a 
private key instead of a password. The private key is contained in a file.

I use WinSCP and can link the connection to the file and can connect fine.

In LC, I’ve set the CABundle to the file, but am not sure this is how it’s 
supposed to work. Getting an auth error when doing tsNetGet.

Any help would be appreciated.

Thanks,

Steve MacLean

PS: Running 9.0 dp6 Business

___
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