Re: filter

2020-11-20 Thread Bob Sneidar via use-livecode
Yeah, not confusing at all. ;-P

Bob S


On Nov 20, 2020, at 9:55 AM, Mark Wieder via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

On 11/20/20 3:27 AM, David V Glasgow via use-livecode wrote:
Apologies for barging in, but I am confused by regex generally and in this 
specific example by the function of the terminal ‘+’  If you are only finding 
one character, why do you need to specify 'at least one' of one char?

Ha!
Yeah, I actually mistyped that (moi?).

"^\[" is all that's necessary for the filter command.

...but Klaus' form of "[[]*[]]" is actually better if the field has
[500] and then text

--
Mark Wieder
ahsoftw...@gmail.com<mailto: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


Re: filter

2020-11-20 Thread Mark Wieder via use-livecode

On 11/20/20 3:27 AM, David V Glasgow via use-livecode wrote:

Apologies for barging in, but I am confused by regex generally and in this 
specific example by the function of the terminal ‘+’  If you are only finding 
one character, why do you need to specify 'at least one' of one char?


Ha!
Yeah, I actually mistyped that (moi?).

"^\[" is all that's necessary for the filter command.

...but Klaus' form of "[[]*[]]" is actually better if the field has
[500] and then text

--
 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


Re: filter

2020-11-20 Thread David V Glasgow via use-livecode
Apologies for barging in, but I am confused by regex generally and in this 
specific example by the function of the terminal ‘+’  If you are only finding 
one character, why do you need to specify 'at least one' of one char?

Cheers

David G

> On 20 Nov 2020, at 8:44 am, Klaus major-k via use-livecode 
>  wrote:
> 
>> ^ = start at beginning of line
>> \[ = a literal "[" character ("\" escapes whatever comes next)
>> + = at least one of those characters

___
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: filter

2020-11-20 Thread Klaus major-k via use-livecode
Hi Mark,

> Am 20.11.2020 um 00:55 schrieb Mark Wieder via use-livecode 
> :
> On 11/19/20 9:09 AM, Klaus major-k via use-livecode wrote:
>> Hi Mark,
>>> Am 19.11.2020 um 18:07 schrieb Mark Wieder via use-livecode 
>>> :
>>> On 11/19/20 7:38 AM, Mark Waddingham via use-livecode wrote:
>>>> I think:
>>>>   filter fld 1 with "[[]*"
>>>> Should do the trick...
>>> As an alternative,
>>> filter fld 1 with regex pattern "^\[+"
>>> also does the trick.
>> thanks, but REGEX is still a TAD over my head. ;-)
> Not really...

how do you know? 8-)

> this is at least as simple as what you just coded:
> 
> ^ = start at beginning of line
> \[ = a literal "[" character ("\" escapes whatever comes next)
> + = at least one of those characters

Thank you, now I am ready to challenge Thierry! :-D

> -- 
> Mark Wieder
> ahsoftw...@gmail.com

Best

Klaus

--
Klaus Major
https://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


Re: filter

2020-11-19 Thread Mark Wieder via use-livecode

On 11/19/20 9:09 AM, Klaus major-k via use-livecode wrote:

Hi Mark,


Am 19.11.2020 um 18:07 schrieb Mark Wieder via use-livecode 
:
On 11/19/20 7:38 AM, Mark Waddingham via use-livecode wrote:

I think:
   filter fld 1 with "[[]*"
Should do the trick...

As an alternative,
filter fld 1 with regex pattern "^\[+"
also does the trick.


thanks, but REGEX is still a TAD over my head. ;-)


Not really... this is at least as simple as what you just coded:

^ = start at beginning of line
\[ = a literal "[" character ("\" escapes whatever comes next)
+ = at least one of those characters

--
 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


RE: filter

2020-11-19 Thread Craig newman via use-livecode
Klaus.

I use "filter" here and there, mostly with regex or wildCards. 

But nothing works for me either,:

Filter yourText with "["
Filter yourText where each contains "["

Not sure what is going on. Where is Thieery?

Craig
-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Klaus major-k via use-livecode
Sent: Thursday, November 19, 2020 10:19 AM
To: How to use LiveCode 
Cc: Klaus major-k 
Subject: filter

Hi all,

I am surely missing something here with filter.

I have a field with some lines like:
...
[500]
text yadda
yadda
[100]
...
And want to filter the field that only the lines with [...] remain in the
field.

So I thought
...
filter fld 1 with "[*" 
...
would do the job, but that EMPTIES the field!?
Obviously this [ interferes with some REGEX mechanism of filter?
So what should I use now?

Any hints very appreciated!


Best

Klaus
--
Klaus Major
https://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


Re: filter

2020-11-19 Thread Bob Sneidar via use-livecode
I don’t think I could watch! Oh the horror!

Bob S


> On Nov 19, 2020, at 9:17 AM, Keith Clarke via use-livecode 
>  wrote:
> 
> The chronicles of regex - a potential blockbuster there, Bob! :-)
> Best,
> Keith
> 
>> On 19 Nov 2020, at 16:49, Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> No one escapes the lair of the Regex Demon. Except for maybe Riddick.
>> 
>> Bob S
>> 
>> 
>> On Nov 19, 2020, at 8:15 AM, Keith Clarke via use-livecode 
>> mailto:use-livecode@lists.runrev.com>> wrote:
>> 
>> Ha, yes I understand that desire - and Mark’s one-character escape trick 
>> beats my hack to bypass the lair of the regex demon! :D
>> Best,
>> Keith
___
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: filter

2020-11-19 Thread Keith Clarke via use-livecode
The chronicles of regex - a potential blockbuster there, Bob! :-)
Best,
Keith

> On 19 Nov 2020, at 16:49, Bob Sneidar via use-livecode 
>  wrote:
> 
> No one escapes the lair of the Regex Demon. Except for maybe Riddick.
> 
> Bob S
> 
> 
> On Nov 19, 2020, at 8:15 AM, Keith Clarke via use-livecode 
> mailto:use-livecode@lists.runrev.com>> wrote:
> 
> Ha, yes I understand that desire - and Mark’s one-character escape trick 
> beats my hack to bypass the lair of the regex demon! :D
> Best,
> Keith
> 
> ___
> 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: filter

2020-11-19 Thread Klaus major-k via use-livecode
Hi Mark,

> Am 19.11.2020 um 18:07 schrieb Mark Wieder via use-livecode 
> :
> On 11/19/20 7:38 AM, Mark Waddingham via use-livecode wrote:
>> I think:
>>   filter fld 1 with "[[]*"
>> Should do the trick...
> As an alternative,
> filter fld 1 with regex pattern "^\[+"
> also does the trick.

thanks, but REGEX is still a TAD over my head. ;-)

> -- 
> Mark Wieder
> ahsoftw...@gmail.com

Best

Klaus

--
Klaus Major
https://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


Re: filter

2020-11-19 Thread Mark Wieder via use-livecode

On 11/19/20 7:38 AM, Mark Waddingham via use-livecode wrote:


I think:

   filter fld 1 with "[[]*"

Should do the trick...


As an alternative,

filter fld 1 with regex pattern "^\[+"

also does the trick.

--
 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


Re: filter

2020-11-19 Thread Bob Sneidar via use-livecode
No one escapes the lair of the Regex Demon. Except for maybe Riddick.

Bob S


On Nov 19, 2020, at 8:15 AM, Keith Clarke via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Ha, yes I understand that desire - and Mark’s one-character escape trick beats 
my hack to bypass the lair of the regex demon! :D
Best,
Keith

___
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: filter

2020-11-19 Thread Keith Clarke via use-livecode
Ha, yes I understand that desire - and Mark’s one-character escape trick beats 
my hack to bypass the lair of the regex demon! :D
Best,
Keith

> On 19 Nov 2020, at 15:51, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Keith,
> 
>> Am 19.11.2020 um 16:38 schrieb Keith Clarke via use-livecode 
>> :
>> 
>> Hi Klaus,
>> Maybe iterate the lines - untested...
>> repeat for each line l in fld 1
>> if and( offset( “[“, l) > 0 , offset(“]”, l) > 0 ) then put line l of fld 1 
>> into tList
>> end repeat 
>> put tList
> 
> yes, sure, but "lazy moi" wanted to use FILTER and also understand why my 
> first script did not work. :-)
> 
>> Best,
>> Keith 
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://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


Re: filter

2020-11-19 Thread Klaus major-k via use-livecode
Hi Keith,

> Am 19.11.2020 um 16:38 schrieb Keith Clarke via use-livecode 
> :
> 
> Hi Klaus,
> Maybe iterate the lines - untested...
> repeat for each line l in fld 1
>  if and( offset( “[“, l) > 0 , offset(“]”, l) > 0 ) then put line l of fld 1 
> into tList
> end repeat 
> put tList

yes, sure, but "lazy moi" wanted to use FILTER and also understand why my first 
script did not work. :-)

> Best,
> Keith 

Best

Klaus

--
Klaus Major
https://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


Re: filter

2020-11-19 Thread Klaus major-k via use-livecode
Hi Mark,

> Am 19.11.2020 um 16:38 schrieb Mark Waddingham via use-livecode 
> :
> 
>> So I thought
>> ...
>> filter fld 1 with "[*"
>> ...
>> would do the job, but that EMPTIES the field!?
>> Obviously this [ interferes with some REGEX mechanism of filter?
>> So what should I use now?
> I think:
>  filter fld 1 with "[[]*"
> Should do the trick...
> Basically, you can use '[...]' to 'escape' the operators in the wildcard 
> pattern (i.e. *, [ and ?).

ah, get it! So I added this accordingly:
...
filter fld 1 with "[[]*[]]"
...
to be on the safe side and it works like a charme!

> Hope this helps,

Yes, it does, thank you very much!

> Mark.
> 
> P.S. Wildcard patterns are a lot simpler than general regexes, but 'filter' 
> can do both "filter ... with regex pattern ..." interprets the pattern the 
> same as matchText/replaceText.
> 
> -- 
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps

Best

Klaus

--
Klaus Major
https://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


Re: filter

2020-11-19 Thread Keith Clarke via use-livecode
Hi Klaus,
Maybe iterate the lines - untested...

repeat for each line l in fld 1
  if and( offset( “[“, l) > 0 , offset(“]”, l) > 0 ) then put line l of fld 1 
into tList
end repeat 

put tList

Best,
Keith 

> On 19 Nov 2020, at 15:19, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi all,
> 
> I am surely missing something here with filter.
> 
> I have a field with some lines like:
> ...
> [500]
> text yadda
> yadda
> [100]
> ...
> And want to filter the field that only the lines with [...] remain in the 
> field.
> 
> So I thought
> ...
> filter fld 1 with "[*" 
> ...
> would do the job, but that EMPTIES the field!?
> Obviously this [ interferes with some REGEX mechanism of filter?
> So what should I use now?
> 
> Any hints very appreciated!
> 
> 
> Best
> 
> Klaus
> --
> Klaus Major
> https://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


Re: filter

2020-11-19 Thread Mark Waddingham via use-livecode

So I thought
...
filter fld 1 with "[*"
...
would do the job, but that EMPTIES the field!?
Obviously this [ interferes with some REGEX mechanism of filter?
So what should I use now?


I think:

  filter fld 1 with "[[]*"

Should do the trick...

Basically, you can use '[...]' to 'escape' the operators in the wildcard 
pattern (i.e. *, [ and ?).


Hope this helps,

Mark.

P.S. Wildcard patterns are a lot simpler than general regexes, but 
'filter' can do both "filter ... with regex pattern ..." interprets the 
pattern the same as matchText/replaceText.


--
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


filter

2020-11-19 Thread Klaus major-k via use-livecode
Hi all,

I am surely missing something here with filter.

I have a field with some lines like:
...
[500]
text yadda
yadda
[100]
...
And want to filter the field that only the lines with [...] remain in the field.

So I thought
...
filter fld 1 with "[*" 
...
would do the job, but that EMPTIES the field!?
Obviously this [ interferes with some REGEX mechanism of filter?
So what should I use now?

Any hints very appreciated!


Best

Klaus
--
Klaus Major
https://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


Re: Filter an array by content

2019-06-21 Thread J. Landman Gay via use-livecode
Mark Talluto's bug is exactly what I see. It may be related to a certain 
type of scripting, or a particular sequence of commands. I crashed several 
times in a row within a minute of a restart, so maybe the handler I was 
debugging was to blame.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On June 21, 2019 5:32:26 PM Bob Sneidar via use-livecode 
 wrote:


I am using V9.0.5 rc1 and I am not having any of these kinds of debugging 
crashes. I rarely step over though. Almost always I step into or out of. (I 
think I have that right.)


Bob S

On Jun 21, 2019, at 14:33 , J. Landman Gay via use-livecode 
 wrote:


On 6/21/19 2:48 PM, Alex Tweedly via use-livecode wrote:

On 21/06/2019 19:38, J. Landman Gay via use-livecode wrote:
My only excuse is that I've been avoiding stepping through the debugger 
because LC has been crashing when I do that. I've sent in many crash logs 
but it's only recently I've discovered it happens only with Step Over. It's 
hard to believe no one else has seen this, which I've been seeing since LC 
9 first came out, but that's why I didn't know what was in the variable.
I've been seeing this too. But it's time to confess my abysmal ignorance - 
how do I get a crash log ?


On Mac, a huge dialog appears with the crash log in it. I select all, copy, 
paste into a text document and save it. On Windows I don't know, but if 
there's a system log (like Console displays on Mac) it's probably in there.



(And is it worthwhile me getting some of them to add to the bug reports?)


Good question. I've uploaded maybe 20-25 of them so far. I don't always 
bother any more.


Now that I've discovered breakpoints don't crash as long as I don't step 
through, I was able to see what's going on.


I was wrong. Not more than a few minutes ago I crashed after stopping at 
multiple breakpoints. It doesn't seem to matter if they're red-dot or 
typed. However, it seems to take more repetitions before the crash if you 
don't do any stepping.


Hmmm - I find I have no choice but to step through; the editor/debugger so 
often "freezes" (i.e. when I scroll the text, the line numbers don't scroll 
at the same time).


I see that all the time. If you step over, the dot location fixes itself at 
least here. Until the crash, anyway. It doesn't crash right away, it seems 
to be a cumulative thing, so you get a few chances before everything goes down.


This has really been crippling my productivity. I'm sure it's a very 
elusive thing to track down but I hope they can find it. If no one else has 
a problem, it may be something script-related that both you and I are doing.



So I can't just set another breakpoint further down - I have to step over 
for a while until the place at which I want to set the breakpoint scrolls 
itself into view.


If you have experienced crashes during debugging, take a look at 
https://quality.livecode.com/show_bug.cgi?id=22130 and 
https://quality.livecode.com/show_bug.cgi?id=21876



Alex.
___
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



--
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: Filter an array by content

2019-06-21 Thread Bob Sneidar via use-livecode
I am using V9.0.5 rc1 and I am not having any of these kinds of debugging 
crashes. I rarely step over though. Almost always I step into or out of. (I 
think I have that right.) 

Bob S

> On Jun 21, 2019, at 14:33 , J. Landman Gay via use-livecode 
>  wrote:
> 
> On 6/21/19 2:48 PM, Alex Tweedly via use-livecode wrote:
>> On 21/06/2019 19:38, J. Landman Gay via use-livecode wrote:
>>> My only excuse is that I've been avoiding stepping through the debugger 
>>> because LC has been crashing when I do that. I've sent in many crash logs 
>>> but it's only recently I've discovered it happens only with Step Over. It's 
>>> hard to believe no one else has seen this, which I've been seeing since LC 
>>> 9 first came out, but that's why I didn't know what was in the variable.
>> I've been seeing this too. But it's time to confess my abysmal ignorance - 
>> how do I get a crash log ?
> 
> On Mac, a huge dialog appears with the crash log in it. I select all, copy, 
> paste into a text document and save it. On Windows I don't know, but if 
> there's a system log (like Console displays on Mac) it's probably in there.
> 
>> (And is it worthwhile me getting some of them to add to the bug reports?)
> 
> Good question. I've uploaded maybe 20-25 of them so far. I don't always 
> bother any more.
> 
>>> Now that I've discovered breakpoints don't crash as long as I don't step 
>>> through, I was able to see what's going on.
> 
> I was wrong. Not more than a few minutes ago I crashed after stopping at 
> multiple breakpoints. It doesn't seem to matter if they're red-dot or typed. 
> However, it seems to take more repetitions before the crash if you don't do 
> any stepping.
> 
>> Hmmm - I find I have no choice but to step through; the editor/debugger so 
>> often "freezes" (i.e. when I scroll the text, the line numbers don't scroll 
>> at the same time).
> 
> I see that all the time. If you step over, the dot location fixes itself at 
> least here. Until the crash, anyway. It doesn't crash right away, it seems to 
> be a cumulative thing, so you get a few chances before everything goes down.
> 
> This has really been crippling my productivity. I'm sure it's a very elusive 
> thing to track down but I hope they can find it. If no one else has a 
> problem, it may be something script-related that both you and I are doing.
> 
> 
>> So I can't just set another breakpoint further down - I have to step over 
>> for a while until the place at which I want to set the breakpoint scrolls 
>> itself into view.
>>> 
>>> If you have experienced crashes during debugging, take a look at 
>>> https://quality.livecode.com/show_bug.cgi?id=22130 and 
>>> https://quality.livecode.com/show_bug.cgi?id=21876
>>> 
>> Alex.
>> ___
>> 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
> 
> 
> -- 
> 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: Filter an array by content

2019-06-21 Thread Mark Talluto via use-livecode
On Jun 21, 2019, at 2:33 PM, J. Landman Gay via use-livecode 
 wrote:
> 
> I see that all the time. If you step over, the dot location fixes itself at 
> least here. Until the crash, anyway. It doesn't crash right away, it seems to 
> be a cumulative thing, so you get a few chances before everything goes down.
> 
> This has really been crippling my productivity. I'm sure it's a very elusive 
> thing to track down but I hope they can find it. If no one else has a 
> problem, it may be something script-related that both you and I are doing.


I have this problem too. I think it has been around for a very long time. I 
have a bug report for it as well.
https://quality.livecode.com/show_bug.cgi?id=22101 



Best regards,

Mark Talluto
livecloud.io 
nursenotes.net 
canelasoftware.com 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Filter an array by content

2019-06-21 Thread J. Landman Gay via use-livecode

On 6/21/19 2:48 PM, Alex Tweedly via use-livecode wrote:


On 21/06/2019 19:38, J. Landman Gay via use-livecode wrote:
My only excuse is that I've been avoiding stepping through the 
debugger because LC has been crashing when I do that. I've sent in 
many crash logs but it's only recently I've discovered it happens only 
with Step Over. It's hard to believe no one else has seen this, which 
I've been seeing since LC 9 first came out, but that's why I didn't 
know what was in the variable.


I've been seeing this too. But it's time to confess my abysmal ignorance 
- how do I get a crash log ?


On Mac, a huge dialog appears with the crash log in it. I select all, 
copy, paste into a text document and save it. On Windows I don't know, 
but if there's a system log (like Console displays on Mac) it's probably 
in there.




(And is it worthwhile me getting some of them to add to the bug reports?)


Good question. I've uploaded maybe 20-25 of them so far. I don't always 
bother any more.




Now that I've discovered breakpoints don't crash as long as I don't 
step through, I was able to see what's going on.


I was wrong. Not more than a few minutes ago I crashed after stopping at 
multiple breakpoints. It doesn't seem to matter if they're red-dot or 
typed. However, it seems to take more repetitions before the crash if 
you don't do any stepping.


Hmmm - I find I have no choice but to step through; the editor/debugger 
so often "freezes" (i.e. when I scroll the text, the line numbers don't 
scroll at the same time).


I see that all the time. If you step over, the dot location fixes itself 
at least here. Until the crash, anyway. It doesn't crash right away, it 
seems to be a cumulative thing, so you get a few chances before 
everything goes down.


This has really been crippling my productivity. I'm sure it's a very 
elusive thing to track down but I hope they can find it. If no one else 
has a problem, it may be something script-related that both you and I 
are doing.



So I can't just set another breakpoint further 
down - I have to step over for a while until the place at which I want 
to set the breakpoint scrolls itself into view.


If you have experienced crashes during debugging, take a look at 
https://quality.livecode.com/show_bug.cgi?id=22130 and 
https://quality.livecode.com/show_bug.cgi?id=21876



Alex.

___
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




--
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


Re: Filter an array by content

2019-06-21 Thread Bob Sneidar via use-livecode
Yes it is in memory, but it makes me think there might be a use case for 
allowing the creation of a file based database. I'll update it and repost on 
the list. 

Bob S


> On Jun 21, 2019, at 12:57 , Tom Glod via use-livecode 
>  wrote:
> 
> very good thanks for elaborating Bob...it makes sense that there are
> use cases where the library really kicks it.. esp since its an in
> memory database (assuming).  Its a good idea, making me rethink a couple of
> things.


___
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: Filter an array by content

2019-06-21 Thread Tom Glod via use-livecode
very good thanks for elaborating Bob...it makes sense that there are
use cases where the library really kicks it.. esp since its an in
memory database (assuming).  Its a good idea, making me rethink a couple of
things.

On Fri, Jun 21, 2019 at 12:06 PM Alex Tweedly via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Bob,
>
> It sounds like your library is something I could benefit from :-)
>
> I know it's been mentioned on the list before, but I've lost track of
> where to get it from, and  a quick search didn't turn anything up. Could
> you please send a reminder (either to the list or direct to me if you
> prefer).
>
> Thanks
>
> Alex.
>
> On 21/06/2019 16:02, Bob Sneidar via use-livecode wrote:
> > Hi Tom.
> >
> > So the little benchmarking I did originally showed that my method was a
> little longer, as I still have to iterate once through the array to
> populate the database. Where it really shines is that you can do complex
> queries, as well as multiple column sorts before converting back to an
> array. Also, if you need to make multiple passes at the data, the speed of
> course exceeds iterating through the array again and again. Finally, since
> it's in a database, it's persistent through idle, whereas an array would
> have to be stored in a script local or a property if you needed it across
> runtime sessions.
> >
> > Bob S
> >
> >
> >> On Jun 20, 2019, at 21:10 , Tom Glod via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >>
> >> A great question Jacque Helpful thread all around.
> >>
> >> I have a tendency to think that any operation i perform to convert an
> >> entire array into something else will take longer than to loop through
> the
> >> keys.  I'm happy to be wrong ,and I imagine it depends on the number of
> >> items in the dataset. But for my particular use at the moment, I find LC
> >> performance to be excellent.
> >>
> >> Bob I'm interested in your library..mostly learning the point at
> which
> >> it makes sense to do that conversion and what kind of speedups can
> >> occur.have you done any benchmarks on it?
> >>
> >> Great reminder & idea 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
___
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: Filter an array by content

2019-06-21 Thread Alex Tweedly via use-livecode



On 21/06/2019 19:38, J. Landman Gay via use-livecode wrote:
My only excuse is that I've been avoiding stepping through the 
debugger because LC has been crashing when I do that. I've sent in 
many crash logs but it's only recently I've discovered it happens only 
with Step Over. It's hard to believe no one else has seen this, which 
I've been seeing since LC 9 first came out, but that's why I didn't 
know what was in the variable.


I've been seeing this too. But it's time to confess my abysmal ignorance 
- how do I get a crash log ?


(And is it worthwhile me getting some of them to add to the bug reports?)

Now that I've discovered breakpoints don't crash as long as I don't 
step through, I was able to see what's going on.
Hmmm - I find I have no choice but to step through; the editor/debugger 
so often "freezes" (i.e. when I scroll the text, the line numbers don't 
scroll at the same time). So I can't just set another breakpoint further 
down - I have to step over for a while until the place at which I want 
to set the breakpoint scrolls itself into view.


If you have experienced crashes during debugging, take a look at 
https://quality.livecode.com/show_bug.cgi?id=22130 and 
https://quality.livecode.com/show_bug.cgi?id=21876



Alex.

___
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: Filter an array by content

2019-06-21 Thread J. Landman Gay via use-livecode
Found the problem. My script local was being emptied for some reason, so 
there was nothing to filter. After repopulating all data it worked.


My only excuse is that I've been avoiding stepping through the debugger 
because LC has been crashing when I do that. I've sent in many crash 
logs but it's only recently I've discovered it happens only with Step 
Over. It's hard to believe no one else has seen this, which I've been 
seeing since LC 9 first came out, but that's why I didn't know what was 
in the variable. Now that I've discovered breakpoints don't crash as 
long as I don't step through, I was able to see what's going on.


If you have experienced crashes during debugging, take a look at 
https://quality.livecode.com/show_bug.cgi?id=22130 and 
https://quality.livecode.com/show_bug.cgi?id=21876


I have several more in my collection that I haven't uploaded yet.

On 6/21/19 4:26 AM, Niggemann, Bernd via use-livecode wrote:


Am 21.06.2019 um 09:01 schrieb 
use-livecode-requ...@lists.runrev.com<mailto:use-livecode-requ...@lists.runrev.com>:

From: "J. Landman Gay"

I spoke too soon. When I tested, I hard-coded a value as the filter
string. But when I use a variable, it fails as it did before. The
elements of the array all start with a 4-character string followed by an
underscore, for example:  ER01_some text here

My variable contains "ER01":

   put tVar & "_*" into tFilter
   filter elements of sArray with tFilter into tNewArray

No go. I've tried a few different iterations. However, this works:

   filter elements of sArray with "ER01_*" into tNewArray


This works for me in 9.0.4 and 9.5 DP1


on mouseUp
local tErr = "ER01"
local tArray, tVar, tNewArray

put (tErr & "_*") into tVar

repeat with i = 1 to 17
   if i mod 2 is 1 then
  put tErr & "_" & i into tArray[i]
   else
  put i into tArray[i]
   end if
end repeat
    breakpoint
filter elements of tArray with tVar into tNewArray
breakpoint
filter elements of tArray with tVar
breakpoint
end mouseUp


may be O <> zero?

Kind regards
Bernd


___
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




--
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


Re: Filter an array by content

2019-06-21 Thread Alex Tweedly via use-livecode

Hi Bob,

It sounds like your library is something I could benefit from :-)

I know it's been mentioned on the list before, but I've lost track of 
where to get it from, and  a quick search didn't turn anything up. Could 
you please send a reminder (either to the list or direct to me if you 
prefer).


Thanks

Alex.

On 21/06/2019 16:02, Bob Sneidar via use-livecode wrote:

Hi Tom.

So the little benchmarking I did originally showed that my method was a little 
longer, as I still have to iterate once through the array to populate the 
database. Where it really shines is that you can do complex queries, as well as 
multiple column sorts before converting back to an array. Also, if you need to 
make multiple passes at the data, the speed of course exceeds iterating through 
the array again and again. Finally, since it's in a database, it's persistent 
through idle, whereas an array would have to be stored in a script local or a 
property if you needed it across runtime sessions.

Bob S



On Jun 20, 2019, at 21:10 , Tom Glod via use-livecode 
 wrote:

A great question Jacque Helpful thread all around.

I have a tendency to think that any operation i perform to convert an
entire array into something else will take longer than to loop through the
keys.  I'm happy to be wrong ,and I imagine it depends on the number of
items in the dataset. But for my particular use at the moment, I find LC
performance to be excellent.

Bob I'm interested in your library..mostly learning the point at which
it makes sense to do that conversion and what kind of speedups can
occur.have you done any benchmarks on it?

Great reminder & idea 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: Filter an array by content

2019-06-21 Thread Bob Sneidar via use-livecode
Hi Tom. 

So the little benchmarking I did originally showed that my method was a little 
longer, as I still have to iterate once through the array to populate the 
database. Where it really shines is that you can do complex queries, as well as 
multiple column sorts before converting back to an array. Also, if you need to 
make multiple passes at the data, the speed of course exceeds iterating through 
the array again and again. Finally, since it's in a database, it's persistent 
through idle, whereas an array would have to be stored in a script local or a 
property if you needed it across runtime sessions. 

Bob S


> On Jun 20, 2019, at 21:10 , Tom Glod via use-livecode 
>  wrote:
> 
> A great question Jacque Helpful thread all around.
> 
> I have a tendency to think that any operation i perform to convert an
> entire array into something else will take longer than to loop through the
> keys.  I'm happy to be wrong ,and I imagine it depends on the number of
> items in the dataset. But for my particular use at the moment, I find LC
> performance to be excellent.
> 
> Bob I'm interested in your library..mostly learning the point at which
> it makes sense to do that conversion and what kind of speedups can
> occur.have you done any benchmarks on it?
> 
> Great reminder & idea 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


Re: Filter an array by content

2019-06-21 Thread Dar Scott Consulting via use-livecode
I wonder whether explicitly specifying "wildcard pattern" would fix this.

(I misread your query as referring to arrays with numeric elements, not arrays 
with numeric keys. Thus, my fascination with the new "where" where one can use 
"each > 22.2". Even with your use, "where" might be interesting.)

> On Jun 21, 2019, at 1:01 AM, J. Landman Gay via use-livecode 
>  wrote:
> 
> I spoke too soon. When I tested, I hard-coded a value as the filter string. 
> But when I use a variable, it fails as it did before. The elements of the 
> array all start with a 4-character string followed by an underscore, for 
> example:  ER01_some text here
> 
> My variable contains "ER01":
> 
>  put tVar & "_*" into tFilter
>  filter elements of sArray with tFilter into tNewArray
> 
> No go. I've tried a few different iterations. However, this works:
> 
>  filter elements of sArray with "ER01_*" into tNewArray
> 
> Even with no matches though, Tom was right. Looping through the keys takes 
> 0.03 milliseconds. Filtering takes 0.22 ms.
> 
> On 6/21/19 1:38 AM, J. Landman Gay via use-livecode wrote:
>> Thanks to all for the replies. Monte, I didn't see your post until Tom 
>> quoted it, for some reason it didn't arrive here.
>> At any rate, I'd already tried "filter elements of..." and it failed which 
>> is why I posted. But I must have had my filter wrong because I just tried it 
>> again and it worked. So that part's solved.
>> And I found something interesting: when I filter a numeric array, the keys 
>> remain attached and since they are numeric, they're in order. Fancy that. :)
>> All is well. Thanks guys.
>> On 6/20/19 11:10 PM, Tom Glod via use-livecode wrote:
>>> A great question Jacque Helpful thread all around.
> 
> 
> -- 
> 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: Filter an array by content

2019-06-21 Thread Niggemann, Bernd via use-livecode


Am 21.06.2019 um 09:01 schrieb 
use-livecode-requ...@lists.runrev.com<mailto:use-livecode-requ...@lists.runrev.com>:

From: "J. Landman Gay"

I spoke too soon. When I tested, I hard-coded a value as the filter
string. But when I use a variable, it fails as it did before. The
elements of the array all start with a 4-character string followed by an
underscore, for example:  ER01_some text here

My variable contains "ER01":

  put tVar & "_*" into tFilter
  filter elements of sArray with tFilter into tNewArray

No go. I've tried a few different iterations. However, this works:

  filter elements of sArray with "ER01_*" into tNewArray


This works for me in 9.0.4 and 9.5 DP1


on mouseUp
   local tErr = "ER01"
   local tArray, tVar, tNewArray

   put (tErr & "_*") into tVar

   repeat with i = 1 to 17
  if i mod 2 is 1 then
 put tErr & "_" & i into tArray[i]
  else
 put i into tArray[i]
  end if
   end repeat
   breakpoint
   filter elements of tArray with tVar into tNewArray
   breakpoint
   filter elements of tArray with tVar
   breakpoint
end mouseUp


may be O <> zero?

Kind regards
Bernd


___
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: Filter an array by content

2019-06-21 Thread J. Landman Gay via use-livecode
I spoke too soon. When I tested, I hard-coded a value as the filter 
string. But when I use a variable, it fails as it did before. The 
elements of the array all start with a 4-character string followed by an 
underscore, for example:  ER01_some text here


My variable contains "ER01":

  put tVar & "_*" into tFilter
  filter elements of sArray with tFilter into tNewArray

No go. I've tried a few different iterations. However, this works:

  filter elements of sArray with "ER01_*" into tNewArray

Even with no matches though, Tom was right. Looping through the keys 
takes 0.03 milliseconds. Filtering takes 0.22 ms.


On 6/21/19 1:38 AM, J. Landman Gay via use-livecode wrote:
Thanks to all for the replies. Monte, I didn't see your post until Tom 
quoted it, for some reason it didn't arrive here.


At any rate, I'd already tried "filter elements of..." and it failed 
which is why I posted. But I must have had my filter wrong because I 
just tried it again and it worked. So that part's solved.


And I found something interesting: when I filter a numeric array, the 
keys remain attached and since they are numeric, they're in order. Fancy 
that. :)


All is well. Thanks guys.

On 6/20/19 11:10 PM, Tom Glod via use-livecode wrote:

A great question Jacque Helpful thread all around.






--
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


Re: Filter an array by content

2019-06-21 Thread J. Landman Gay via use-livecode
Thanks to all for the replies. Monte, I didn't see your post until Tom 
quoted it, for some reason it didn't arrive here.


At any rate, I'd already tried "filter elements of..." and it failed 
which is why I posted. But I must have had my filter wrong because I 
just tried it again and it worked. So that part's solved.


And I found something interesting: when I filter a numeric array, the 
keys remain attached and since they are numeric, they're in order. Fancy 
that. :)


All is well. Thanks guys.

On 6/20/19 11:10 PM, Tom Glod via use-livecode wrote:

A great question Jacque Helpful thread all around.



--
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


Re: Filter an array by content

2019-06-20 Thread Tom Glod via use-livecode
A great question Jacque Helpful thread all around.

I have a tendency to think that any operation i perform to convert an
entire array into something else will take longer than to loop through the
keys.  I'm happy to be wrong ,and I imagine it depends on the number of
items in the dataset. But for my particular use at the moment, I find LC
performance to be excellent.

Bob I'm interested in your library..mostly learning the point at which
it makes sense to do that conversion and what kind of speedups can
occur.have you done any benchmarks on it?

Great reminder & idea Monte

On Thu, Jun 20, 2019 at 6:19 PM Monte Goulding via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Jacque, does the output also need to be a sequential numeric array? If
> so then no variant of the filter command will help. If not then can’t you
> `filter elements of theArray with “*foobar*”``? It would be a nice addition
> to filter elements to have `as sequence` or something so the result had
> keys 1..N.
>
> > On 21 Jun 2019, at 6:56 am, J. Landman Gay via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > I need to filter a numeric array by the content of the keys, not by the
> keys themselves. Is there a way to do that without looping through the
> entire array and looking at each element?
> >
> > --
> > 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: Filter an array by content

2019-06-20 Thread Monte Goulding via use-livecode
Hi Jacque, does the output also need to be a sequential numeric array? If so 
then no variant of the filter command will help. If not then can’t you `filter 
elements of theArray with “*foobar*”``? It would be a nice addition to filter 
elements to have `as sequence` or something so the result had keys 1..N.

> On 21 Jun 2019, at 6:56 am, J. Landman Gay via use-livecode 
>  wrote:
> 
> I need to filter a numeric array by the content of the keys, not by the keys 
> themselves. Is there a way to do that without looping through the entire 
> array and looking at each element?
> 
> -- 
> 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: Filter an array by content

2019-06-20 Thread Dar Scott Consulting via use-livecode
If LiveCode 9.5 is not applicable (since it is not released), then...

If those numbers are codes taken from some small universe of codes, then maybe 
intersect will work:
intersect affectedZipCodes with TreatedZipCodes into inspectionZipCodes


But if you can go with 9.5, then maybe "where" will work:
filter elements of testDistance where each > 20.5 into failedDistance



> On Jun 20, 2019, at 2:56 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> I need to filter a numeric array by the content of the keys, not by the keys 
> themselves. Is there a way to do that without looping through the entire 
> array and looking at each element?
> 
> -- 
> 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: Filter an array by content

2019-06-20 Thread Dar Scott Consulting via use-livecode
I think the filtering of array items was introduced in 8.1, so combine and 
split might not be needed. However, unless pattern matching will do, one has to 
wait until 9.5 to use the "where" clause in "filter".

> On Jun 20, 2019, at 3:37 PM, hh via use-livecode 
>  wrote:
> 
> Why not "combine array V > filter V > split V"?
> 
>> JLG wrote:
>> I need to filter a numeric array by the content of the keys, not by the 
>> keys themselves. Is there a way to do that without looping through the 
>> entire array and looking at each element?
> 
> ___
> 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: Filter an array by content

2019-06-20 Thread Bob Sneidar via use-livecode
You would have to also sort. Also, the array might not be sorted after the 
split. 

Bob S


> On Jun 20, 2019, at 14:37 , hh via use-livecode 
>  wrote:
> 
> Why not "combine array V > filter V > split V"?
> 
>> JLG wrote:
>> I need to filter a numeric array by the content of the keys, not by the 
>> keys themselves. Is there a way to do that without looping through the 
>> entire array and looking at each element?


___
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: Filter an array by content

2019-06-20 Thread hh via use-livecode
Why not "combine array V > filter V > split V"?

> JLG wrote:
> I need to filter a numeric array by the content of the keys, not by the 
> keys themselves. Is there a way to do that without looping through the 
> entire array and looking at each element?

___
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: Filter an array by content

2019-06-20 Thread Bob Sneidar via use-livecode
This is the perfect scenario for my arrayToDB library. Convert array to sqLite 
DB, query the DB using SELECT * from  WHERE  ORDER 
BY CAST( AS  decimal(10.2)) then convert the resulting cursor back to 
an array. Contact me offlist if interested. 

Bob S


> On Jun 20, 2019, at 13:56 , J. Landman Gay via use-livecode 
>  wrote:
> 
> I need to filter a numeric array by the content of the keys, not by the keys 
> themselves. Is there a way to do that without looping through the entire 
> array and looking at each element?
> 
> -- 
> Jacqueline Landman Gay | jac...@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


Re: Filter an array by content

2019-06-20 Thread Dar Scott Consulting via use-livecode
In 9.5, perhaps,
filter ... where 
will do it.

> On Jun 20, 2019, at 2:56 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> I need to filter a numeric array by the content of the keys, not by the keys 
> themselves. Is there a way to do that without looping through the entire 
> array and looking at each element?
> 
> -- 
> 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


Filter an array by content

2019-06-20 Thread J. Landman Gay via use-livecode
I need to filter a numeric array by the content of the keys, not by the 
keys themselves. Is there a way to do that without looping through the 
entire array and looking at each element?


--
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


LC Wildcard filter citation source?

2018-12-08 Thread David V Glasgow via use-livecode
Hello folks,

I am writing an academic paper on an analysis of internet predator messages 
undertaken using an LC app.  

A few of the filtered terms I used incorporated wildcards (I avoided regular 
expressions).  I need to reference a published source for the implementation of 
wildcards within LC, if such a thing exists.

Does it?

Cheers,

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


RE: filter list_of_files with REGEX xyz?

2018-08-17 Thread Ralph DiMola via use-livecode
Let them eat cake.

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 Bob Sneidar via use-livecode
Sent: Friday, August 17, 2018 4:39 PM
To: How to use LiveCode
Cc: Bob Sneidar
Subject: Re: filter list_of_files with REGEX xyz?

Half want cake, the other half, pie. 

Bob S


> On Aug 17, 2018, at 09:45 , Mark Wieder via use-livecode
 wrote:
> 
> On 08/17/2018 08:54 AM, Ralph DiMola via use-livecode wrote:
>> True true... I thought about it but left it as is just in case there 
>> was an image without a file name before the ".". I did not want it to be
missed.
>> You know users...
> 
> LOL
> 
> --
> 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: filter list_of_files with REGEX xyz?

2018-08-17 Thread Bob Sneidar via use-livecode
Half want cake, the other half, pie. 

Bob S


> On Aug 17, 2018, at 09:45 , Mark Wieder via use-livecode 
>  wrote:
> 
> On 08/17/2018 08:54 AM, Ralph DiMola via use-livecode wrote:
>> True true... I thought about it but left it as is just in case there was an
>> image without a file name before the ".". I did not want it to be missed.
>> You know users...
> 
> LOL
> 
> -- 
> 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


Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Mark Wieder via use-livecode

On 08/17/2018 08:54 AM, Ralph DiMola via use-livecode wrote:

True true... I thought about it but left it as is just in case there was an
image without a file name before the ".". I did not want it to be missed.
You know users...


LOL

--
 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


RE: filter list_of_files with REGEX xyz?

2018-08-17 Thread Ralph DiMola via use-livecode
True true... I thought about it but left it as is just in case there was an
image without a file name before the ".". I did not want it to be missed.
You know users...

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 Mark Wieder via use-livecode
Sent: Friday, August 17, 2018 11:41 AM
To: Ralph DiMola via use-livecode
Cc: Mark Wieder
Subject: Re: filter list_of_files with REGEX xyz?

On 08/17/2018 07:13 AM, Ralph DiMola via use-livecode wrote:
> filter tList with regex pattern "(?i).*\.(jpe?g|png|gif)$"

For a file list that should probably be

filter tList with regex pattern "(?i).+\.(jpe?g|png|gif)$"

unless you explicitly want to see file names that start with "."

-- 
  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: filter list_of_files with REGEX xyz?

2018-08-17 Thread Mark Wieder via use-livecode

On 08/17/2018 07:13 AM, Ralph DiMola via use-livecode wrote:

filter tList with regex pattern "(?i).*\.(jpe?g|png|gif)$"


For a file list that should probably be

filter tList with regex pattern "(?i).+\.(jpe?g|png|gif)$"

unless you explicitly want to see file names that start with "."

--
 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


Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Lagi Pittas via use-livecode
I was going to send the whole line but Hermann has beaten me to it - and I
will use his version from now on, thanks Hermann.

Lagi


On Fri, 17 Aug 2018 at 15:03, Klaus major-k via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Hermann,
>
> > Am 17.08.2018 um 15:58 schrieb hh via use-livecode <
> use-livecode@lists.runrev.com>:
> >
> > This is already case-insensitive, but the period needs an escape:
> >
> > filter tList with regex pattern "\.*(jpe?g|png|gif)$"
>
> ah, jetzt ja! :-)
> Thanks a lot!
>
> 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


Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Lagi Pittas via use-livecode
I used (without the gif)

.*\.jpj|jpeg|png|gif

The above is not case sensitive  - just tested it

Lagi

On Fri, 17 Aug 2018 at 14:45, Ralph DiMola via use-livecode <
use-livecode@lists.runrev.com> wrote:

> (?i) turn off case sensitivity for everything after it in the regex
> expression. (?-i) turns it back on again for everything after it.
>
> 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 Brian Milby via use-livecode
> Sent: Friday, August 17, 2018 9:19 AM
> To: How to use LiveCode
> Cc: Brian Milby
> Subject: Re: filter list_of_files with REGEX xyz?
>
> RegEx pattern
> Sorry, I was just giving the pattern, not the syntax.
> Also, it will probably be case sensitive in that format. I won’t be able
> to test until later. I don’t recall the case insensitive flag off hand.
>
> Thanks,
> Brian
> On Aug 17, 2018, 8:15 AM -0500, Klaus major-k via use-livecode <
> use-livecode@lists.runrev.com>, wrote:
> > Hi Brian,
> >
> > > Am 17.08.2018 um 14:40 schrieb Brian Milby via use-livecode <
> use-livecode@lists.runrev.com>:
> > >
> > > Pattern “*.(jpe?g|png|gif)”
> >
> > thanks, but that does not work!?
> >
> > I tried:
> > on mouseUp pMouseButton
> > answer folder "sdsdsdsd"
> > put it into tFolder
> > put files(tFolder) into tList
> > filter tList with pattern "*.(jpe?g|png|gif)"
> > answer tList
> > end mouseUp
> >
> > tList = EMPTY, I made of course sure there are JPG, PNG and GIF files in
> that folder.
> >
> > Same when I use:
> > ...
> > filter lines of tList with pattern "*.(jpe?g|png|gif)"
> > ...
> > Any clues?
> >
> > > Thanks,
> >
> > You're welcome! :-)
> >
> > > Brian
> > > On Aug 17, 2018, 6:44 AM -0500, Klaus major-k via use-livecode <
> use-livecode@lists.runrev.com>, wrote:
> > > > Hi friends,
> > > >
> > > > I know how to:
> > > > ...
> > > > filter list_of_files with "*.jpg"
> > > > ...
> > > > But REGEX stuff is way over my head. :-/ Can anyone provide the
> > > > regex/pattern syntax for filtering jpg, png etc. in ONE run? Know
> > > > what I mean?
> >
> > 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: filter list_of_files with REGEX xyz?

2018-08-17 Thread Ralph DiMola via use-livecode
The ".*" is the wild card(zero or more) and "\." Is the period.

filter tList with regex pattern "(?i).*\.(jpe?g|png|gif)$"

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 hh via use-livecode
Sent: Friday, August 17, 2018 9:58 AM
To: use-livecode@lists.runrev.com
Cc: hh
Subject: Re: filter list_of_files with REGEX xyz?

This is already case-insensitive, but the period needs an escape:

filter tList with regex pattern "\.*(jpe?g|png|gif)$"


___
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: filter list_of_files with REGEX xyz?

2018-08-17 Thread Brian Milby via use-livecode
Let’s try this again...
Regex pattern “.*\.(jpe?g|png)$”

. - any character
* - any number of previous match term
? - 0 or 1 of previous term
\. - escapes the period for literal match
() - groups terms
| - alternates within group
$ - end of line

Thanks,
Brian
On Aug 17, 2018, 8:45 AM -0500, Ralph DiMola via use-livecode 
, wrote:
> (?i) turn off case sensitivity for everything after it in the regex 
> expression. (?-i) turns it back on again for everything after it.
>
> 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 Brian Milby via use-livecode
> Sent: Friday, August 17, 2018 9:19 AM
> To: How to use LiveCode
> Cc: Brian Milby
> Subject: Re: filter list_of_files with REGEX xyz?
>
> RegEx pattern
> Sorry, I was just giving the pattern, not the syntax.
> Also, it will probably be case sensitive in that format. I won’t be able to 
> test until later. I don’t recall the case insensitive flag off hand.
>
> Thanks,
> Brian
> On Aug 17, 2018, 8:15 AM -0500, Klaus major-k via use-livecode 
> , wrote:
> > Hi Brian,
> >
> > > Am 17.08.2018 um 14:40 schrieb Brian Milby via use-livecode 
> > > :
> > >
> > > Pattern “*.(jpe?g|png|gif)”
> >
> > thanks, but that does not work!?
> >
> > I tried:
> > on mouseUp pMouseButton
> > answer folder "sdsdsdsd"
> > put it into tFolder
> > put files(tFolder) into tList
> > filter tList with pattern "*.(jpe?g|png|gif)"
> > answer tList
> > end mouseUp
> >
> > tList = EMPTY, I made of course sure there are JPG, PNG and GIF files in 
> > that folder.
> >
> > Same when I use:
> > ...
> > filter lines of tList with pattern "*.(jpe?g|png|gif)"
> > ...
> > Any clues?
> >
> > > Thanks,
> >
> > You're welcome! :-)
> >
> > > Brian
> > > On Aug 17, 2018, 6:44 AM -0500, Klaus major-k via use-livecode 
> > > , wrote:
> > > > Hi friends,
> > > >
> > > > I know how to:
> > > > ...
> > > > filter list_of_files with "*.jpg"
> > > > ...
> > > > But REGEX stuff is way over my head. :-/ Can anyone provide the
> > > > regex/pattern syntax for filtering jpg, png etc. in ONE run? Know
> > > > what I mean?
> >
> > 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: filter list_of_files with REGEX xyz?

2018-08-17 Thread Klaus major-k via use-livecode
Hi Hermann,

> Am 17.08.2018 um 15:58 schrieb hh via use-livecode 
> :
> 
> This is already case-insensitive, but the period needs an escape:
> 
> filter tList with regex pattern "\.*(jpe?g|png|gif)$"

ah, jetzt ja! :-)
Thanks a lot!

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


Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread hh via use-livecode
This is already case-insensitive, but the period needs an escape:

filter tList with regex pattern "\.*(jpe?g|png|gif)$"


___
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: filter list_of_files with REGEX xyz?

2018-08-17 Thread Ralph DiMola via use-livecode
(?i) turn off case sensitivity for everything after it in the regex expression. 
(?-i) turns it back on again for everything after it.

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 
Brian Milby via use-livecode
Sent: Friday, August 17, 2018 9:19 AM
To: How to use LiveCode
Cc: Brian Milby
Subject: Re: filter list_of_files with REGEX xyz?

RegEx pattern
Sorry, I was just giving the pattern, not the syntax.
Also, it will probably be case sensitive in that format. I won’t be able to 
test until later. I don’t recall the case insensitive flag off hand.

Thanks,
Brian
On Aug 17, 2018, 8:15 AM -0500, Klaus major-k via use-livecode 
, wrote:
> Hi Brian,
>
> > Am 17.08.2018 um 14:40 schrieb Brian Milby via use-livecode 
> > :
> >
> > Pattern “*.(jpe?g|png|gif)”
>
> thanks, but that does not work!?
>
> I tried:
> on mouseUp pMouseButton
> answer folder "sdsdsdsd"
> put it into tFolder
> put files(tFolder) into tList
> filter tList with pattern "*.(jpe?g|png|gif)"
> answer tList
> end mouseUp
>
> tList = EMPTY, I made of course sure there are JPG, PNG and GIF files in that 
> folder.
>
> Same when I use:
> ...
> filter lines of tList with pattern "*.(jpe?g|png|gif)"
> ...
> Any clues?
>
> > Thanks,
>
> You're welcome! :-)
>
> > Brian
> > On Aug 17, 2018, 6:44 AM -0500, Klaus major-k via use-livecode 
> > , wrote:
> > > Hi friends,
> > >
> > > I know how to:
> > > ...
> > > filter list_of_files with "*.jpg"
> > > ...
> > > But REGEX stuff is way over my head. :-/ Can anyone provide the 
> > > regex/pattern syntax for filtering jpg, png etc. in ONE run? Know 
> > > what I mean?
>
> 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: filter list_of_files with REGEX xyz?

2018-08-17 Thread Klaus major-k via use-livecode
Hi Brian,

> Am 17.08.2018 um 15:19 schrieb Brian Milby via use-livecode 
> :
> 
> RegEx pattern
> Sorry, I was just giving the pattern, not the syntax.
> Also, it will probably be case sensitive in that format.

My suffixes are all lower case, so this shouldn't matter here.

> I won’t be able to test until later. I don’t recall the case insensitive flag 
> off hand.

No joy :-/

If I use:
...
filter tList with regex pattern "*.(jpe?g|png|gif)"
...
or
...
filter lines of tList with regex pattern "*.(jpe?g|png|gif)"
...
I get an error: 
button "Button": execution error at line 8 (matchChunk: error in pattern 
expression), char 1

> Thanks,
> Brian

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

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Brian Milby via use-livecode
RegEx pattern
Sorry, I was just giving the pattern, not the syntax.
Also, it will probably be case sensitive in that format. I won’t be able to 
test until later. I don’t recall the case insensitive flag off hand.

Thanks,
Brian
On Aug 17, 2018, 8:15 AM -0500, Klaus major-k via use-livecode 
, wrote:
> Hi Brian,
>
> > Am 17.08.2018 um 14:40 schrieb Brian Milby via use-livecode 
> > :
> >
> > Pattern “*.(jpe?g|png|gif)”
>
> thanks, but that does not work!?
>
> I tried:
> on mouseUp pMouseButton
> answer folder "sdsdsdsd"
> put it into tFolder
> put files(tFolder) into tList
> filter tList with pattern "*.(jpe?g|png|gif)"
> answer tList
> end mouseUp
>
> tList = EMPTY, I made of course sure there are JPG, PNG and GIF files in that 
> folder.
>
> Same when I use:
> ...
> filter lines of tList with pattern "*.(jpe?g|png|gif)"
> ...
> Any clues?
>
> > Thanks,
>
> You're welcome! :-)
>
> > Brian
> > On Aug 17, 2018, 6:44 AM -0500, Klaus major-k via use-livecode 
> > , wrote:
> > > Hi friends,
> > >
> > > I know how to:
> > > ...
> > > filter list_of_files with "*.jpg"
> > > ...
> > > But REGEX stuff is way over my head. :-/
> > > Can anyone provide the regex/pattern syntax for filtering
> > > jpg, png etc. in ONE run? Know what I mean?
>
> 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

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Klaus major-k via use-livecode
Hi Brian,

> Am 17.08.2018 um 14:40 schrieb Brian Milby via use-livecode 
> :
> 
> Pattern “*.(jpe?g|png|gif)”

thanks, but that does not work!?

I tried:
on mouseUp pMouseButton
 answer folder "sdsdsdsd"
 put it into tFolder
 put files(tFolder) into tList
 filter tList with pattern "*.(jpe?g|png|gif)"
 answer tList
end mouseUp

tList = EMPTY, I made of course sure there are JPG, PNG and GIF files in that 
folder.

Same when I use:
...
filter lines of tList with pattern "*.(jpe?g|png|gif)"
...
Any clues?

> Thanks,

You're welcome! :-)

> Brian
> On Aug 17, 2018, 6:44 AM -0500, Klaus major-k via use-livecode 
> , wrote:
>> Hi friends,
>> 
>> I know how to:
>> ...
>> filter list_of_files with "*.jpg"
>> ...
>> But REGEX stuff is way over my head. :-/
>> Can anyone provide the regex/pattern syntax for filtering
>> jpg, png etc. in ONE run? Know what I mean?

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

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Brian Milby via use-livecode
Pattern “*.(jpe?g|png|gif)”

Thanks,
Brian
On Aug 17, 2018, 6:44 AM -0500, Klaus major-k via use-livecode 
, wrote:
> Hi friends,
>
> I know how to:
> ...
> filter list_of_files with "*.jpg"
> ...
> But REGEX stuff is way over my head. :-/
>
> Can anyone provide the regex/pattern syntax for filtering
> jpg, png etc. in ONE run? Know what I mean?
>
> Thanks a lot in advance!
>
>
> 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

filter list_of_files with REGEX xyz?

2018-08-17 Thread Klaus major-k via use-livecode
Hi friends,

I know how to: 
...
filter list_of_files with "*.jpg"
...
But REGEX stuff is way over my head. :-/

Can anyone provide the regex/pattern syntax for filtering 
jpg, png etc. in ONE run? Know what I mean?

Thanks a lot in advance!


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


Re: How to filter a list with a variable anywhere in a line

2018-08-13 Thread Colin Holgate via use-livecode
In that book I wrote there is a chapter on making a web scraper, something that 
could pull images and other media from a web page. I soon found all the 
articles talking about not using regex with HTML, so I used a mixture of 
techniques instead. Here’s the first part I wrote about it:

“A common approach when extracting a known pattern of text is to use regular 
expressions, often referred to as regex or regexp. At its simplest it's easy to 
understand, but it can get quite complex. Read the Wikipedia article if you 
want to understand it in depth:

http://en.wikipedia.org/wiki/Regular_expression

Another useful source of information is this Packt article on regular 
expressions:

http://www.packtpub.com/article/regular-expressions-python-26-text-processing

One problem though is that using regexp to parse HTML content is frowned upon. 
There are scores of articles online telling you outright not to parse HTML with 
regexp! Here's one pithy example:

http://boingboing.net/2011/11/24/why-you-shouldnt-parse-html.html

Now, parsing HTML source is exactly what we want to do here, and one solution 
to the problem is to mix and match, using LiveCode's other text matching and 
filtering abilities to do most of the work. Although it's not exactly regexp, 
LiveCode can use regular expressions in some of its matching and filtering 
functions, and they are somewhat easier to understand than full-blown regexp. 
So, let's begin by using those …”

A few pages later I do use some regex to pull text from the page:

function getText pPageSource
   put 
replaceText(pPageSource,"(?:<(?Pscript|style)[\s\S]*?)|(?:)|(?:<[\s\S]*?>)","")
 into pPageSource
   replace lf with "" in pPageSource”
   replace tab with " " in pPageSource
   return pPageSource
end getText
___
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 filter a list with a variable anywhere in a line

2018-08-13 Thread Mark Wieder via use-livecode



Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn

--
 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


Re: How to filter a list with a variable anywhere in a line

2018-08-13 Thread Bob Sneidar via use-livecode
That was it! LOL!

Bob S


> On Aug 13, 2018, at 09:28 , J. Landman Gay via use-livecode 
>  wrote:
> 
> I You can't parse html with regex:
> 
> https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags#
> 
> See the top accepted answer.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On August 13, 2018 11:12:53 AM Bob Sneidar via use-livecode 
>  wrote:
> 
>> Someone did a great article on using regex to parse csv files or some such 
>> thing, and was making the case why it couldn't be done, and in the middle of 
>> attempting to explain it, the author loses his mind. It was pretty funny.
>> 
>> Bob S


___
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 filter a list with a variable anywhere in a line

2018-08-13 Thread J. Landman Gay via use-livecode

I You can't parse html with regex:

https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags#

See the top accepted answer.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On August 13, 2018 11:12:53 AM Bob Sneidar via use-livecode 
 wrote:


Someone did a great article on using regex to parse csv files or some such 
thing, and was making the case why it couldn't be done, and in the middle 
of attempting to explain it, the author loses his mind. It was pretty funny.


Bob S


On Aug 13, 2018, at 09:01 , Keith Clarke via use-livecode 
 wrote:


Indeed, especially when anything regexy should be viewed from a safe 
distance - ideally from behind the couch …in a tin-foil hat!


___
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 filter a list with a variable anywhere in a line

2018-08-13 Thread Keith Clarke via use-livecode
…ad insanem regexum - maybe his tin-foil hat slipped off.

Keith 

> On 13 Aug 2018, at 17:11, Bob Sneidar via use-livecode 
>  wrote:
> 
> Someone did a great article on using regex to parse csv files or some such 
> thing, and was making the case why it couldn't be done, and in the middle of 
> attempting to explain it, the author loses his mind. It was pretty funny. 
> 
> Bob S
> 
> 
>> On Aug 13, 2018, at 09:01 , Keith Clarke via use-livecode 
>>  wrote:
>> 
>> Indeed, especially when anything regexy should be viewed from a safe 
>> distance - ideally from behind the couch …in a tin-foil hat!
> 
> ___
> 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 filter a list with a variable anywhere in a line

2018-08-13 Thread Bob Sneidar via use-livecode
Someone did a great article on using regex to parse csv files or some such 
thing, and was making the case why it couldn't be done, and in the middle of 
attempting to explain it, the author loses his mind. It was pretty funny. 

Bob S


> On Aug 13, 2018, at 09:01 , Keith Clarke via use-livecode 
>  wrote:
> 
> Indeed, especially when anything regexy should be viewed from a safe distance 
> - ideally from behind the couch …in a tin-foil hat!

___
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 filter a list with a variable anywhere in a line

2018-08-13 Thread Keith Clarke via use-livecode
Indeed, especially when anything regexy should be viewed from a safe distance - 
ideally from behind the couch …in a tin-foil hat!

> On 13 Aug 2018, at 16:54, Mark Wieder via use-livecode 
>  wrote:
> 
> On 08/13/2018 08:51 AM, Keith Clarke via use-livecode wrote:
>> Thanks Mark - that fixed it (as in, the simpler approach of dropping the 
>> brackets).
>> Being ‘regex-phobic', I hadn’t picked up the subtle difference between 
>> wildcards and ‘formal’ regex in the doc examples. ;-)
> 
> Yeah, it's pretty subtle since the bare filter syntax looks quite regexy all 
> by itself.
> 
> -- 
> 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: How to filter a list with a variable anywhere in a line

2018-08-13 Thread Mark Wieder via use-livecode

On 08/13/2018 08:51 AM, Keith Clarke via use-livecode wrote:

Thanks Mark - that fixed it (as in, the simpler approach of dropping the 
brackets).

Being ‘regex-phobic', I hadn’t picked up the subtle difference between 
wildcards and ‘formal’ regex in the doc examples. ;-)


Yeah, it's pretty subtle since the bare filter syntax looks quite regexy 
all by itself.


--
 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

Re: How to filter a list with a variable anywhere in a line

2018-08-13 Thread Keith Clarke via use-livecode
Thanks Mark - that fixed it (as in, the simpler approach of dropping the 
brackets). 

Being ‘regex-phobic', I hadn’t picked up the subtle difference between 
wildcards and ‘formal’ regex in the doc examples. ;-)

Thanks & regards,

Keith

> On 13 Aug 2018, at 16:38, Mark Wieder via use-livecode 
>  wrote:
> 
> On 08/13/2018 08:32 AM, Keith Clarke via use-livecode wrote:
>> Folks,
>> I’m trying to filter a list of comma-delimited values to include only the 
>> lines that contain a string - somewhere in any of the items.
>> What’s wrong with this syntax - it’s currently returning no lines when I can 
>> see tString in the second line of the variable?
>> filter lines of tList with "*[" & tString & "]*"
>> I’m guessing my concatenation fails to create good regex?
> 
> If you really want regex then you have to specify that explictly:
> 
> filter lines of tList with regex pattern "*[" & tString & "]*"
> 
> but my guess is what you want is just
> 
> filter lines of tList with "*" & tString & "*"
> 
> -- 
> 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: How to filter a list with a variable anywhere in a line

2018-08-13 Thread Mark Wieder via use-livecode

On 08/13/2018 08:32 AM, Keith Clarke via use-livecode wrote:

Folks,
I’m trying to filter a list of comma-delimited values to include only the lines 
that contain a string - somewhere in any of the items.

What’s wrong with this syntax - it’s currently returning no lines when I can 
see tString in the second line of the variable?

filter lines of tList with "*[" & tString & "]*"


I’m guessing my concatenation fails to create good regex?


If you really want regex then you have to specify that explictly:

filter lines of tList with regex pattern "*[" & tString & "]*"

but my guess is what you want is just

filter lines of tList with "*" & tString & "*"

--
 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

How to filter a list with a variable anywhere in a line

2018-08-13 Thread Keith Clarke via use-livecode
Folks,
I’m trying to filter a list of comma-delimited values to include only the lines 
that contain a string - somewhere in any of the items.

What’s wrong with this syntax - it’s currently returning no lines when I can 
see tString in the second line of the variable?

filter lines of tList with "*[" & tString & "]*"


I’m guessing my concatenation fails to create good regex?

TIA
Keith
___
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: OT: Does anybody know an "official" h.264 directShow filter for windows?

2017-08-29 Thread Sean Cole (Pi) via use-livecode
Cisco has also made an open source decoder/encoder.
https://github.com/cisco/openh264http://www.openh264.org

Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
+44(1634)402193
+44(7702)116447
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

eMail Ts & Cs <http://pidigital.co.uk/emailTCs.rtf>   Pi Digital
Productions Ltd is a UK registered limited company, no. 5255609

On 29 August 2017 at 16:29, Tiemo Hollmann TB via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Sean,
>
> thank you for your links. I had already tested those links. The microsoft
> media feature packs are only for the stripped "N" and "KN" versions of
> windows to add those components, which are included in the standard windows
> systems. Those installers can't be installed on a normal windows.
> The intel link is a developer kit, if you plan to develop your own video
> player, unfortunately there is no installer for the filter only.
>
> Meanwhile I tested the LAV filter and the ffdShow filter, both are for
> playback h.264 videos on the directShow API. But the video can't be played
> and LiveCode still tells me " Could not create movie reference" Probably
> it's not the filter, but any deeper system component or incompatibility.
>
> Thanks for jumping in
> Tiemo
>
>
> -Ursprüngliche Nachricht-
> Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im
> Auftrag
> von Sean Cole (Pi) via use-livecode
> Gesendet: Dienstag, 29. August 2017 16:48
> An: How to use LiveCode <use-livecode@lists.runrev.com>
> Cc: Sean Cole (Pi) <s...@pidigital.co.uk>
> Betreff: Re: OT: Does anybody know an "official" h.264 directShow filter
> for
> windows?
>
> Hi Tiemo
>
> WinXP: https://www.microsoft.com/en-us/download/details.aspx?id=507
> Windows 7:
> https://msdn.microsoft.com/en-us/library/windows/desktop/
> dd797815(v=vs.85).a
> spx
> Windows 8 N & KN:
> https://www.microsoft.com/en-us/download/details.aspx?id=40744
> Windows 10 N & KN:
> https://www.microsoft.com/en-us/download/details.aspx?id=49919
>
> The official Intel H.264 SDK:
> https://software.intel.com/en-us/articles/mp4avc-decode-
> using-the-intel-medi
> a-sdk
>
> Sean Cole
> *Pi Digital Productions Ltd*
> www.pidigital.co.uk
> +44(1634)402193
> +44(7702)116447
> 'Don't try to think outside the box. Just remember the truth: There is no
> box!'
> 'For then you realise it is not the box you are trying to look outside of,
> but it is yourself!'
>
> eMail Ts & Cs <http://pidigital.co.uk/emailTCs.rtf>   Pi Digital
> Productions Ltd is a UK registered limited company, no. 5255609
>
> On 29 August 2017 at 09:13, Tiemo Hollmann TB via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Hello,
> >
> > It is so frustrating after struggling for years with the Quicktime
> > installer on windows, all my hope on the new "native" video player is
> > lost.
> >
> > Since Windows doesn't support h.264 videos on its old directShow API,
> > you have to install a h.264 codec/filter to playback h.264 videos with
> > LiveCode.
> >
> > Up to now, I only have found the "LAV Filters" package, which includes
> > an directShow mp4 filter. Generally this works fine, but I have
> > customers with Windows 8.1 and 10 machines, who can't play my videos,
> > the screen just keeps black without notice. Beside of the "K-Lite Mega
> > Codec Pack", which at last only is a bundle for the LAV filters I
> > didn't found any other directShow
> > mp4/h.264 filter, not to mention any "official" installer. Has anybody
> > found any other directShow mp4/h.264 filter yet?
> >
> > On the other hand, since this total black out only happens on certain
> > machines, it could be anything from the video card driver to missing
> > media components in windows. But here also I didn't found yet any hint or
> clue.
> >
> > Thanks for your experiences
> >
> > Tiemo
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ___
> > 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 visi

AW: OT: Does anybody know an "official" h.264 directShow filter for windows?

2017-08-29 Thread Tiemo Hollmann TB via use-livecode
Hi Sean,

thank you for your links. I had already tested those links. The microsoft
media feature packs are only for the stripped "N" and "KN" versions of
windows to add those components, which are included in the standard windows
systems. Those installers can't be installed on a normal windows.
The intel link is a developer kit, if you plan to develop your own video
player, unfortunately there is no installer for the filter only.

Meanwhile I tested the LAV filter and the ffdShow filter, both are for
playback h.264 videos on the directShow API. But the video can't be played
and LiveCode still tells me " Could not create movie reference" Probably
it's not the filter, but any deeper system component or incompatibility.

Thanks for jumping in
Tiemo


-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
von Sean Cole (Pi) via use-livecode
Gesendet: Dienstag, 29. August 2017 16:48
An: How to use LiveCode <use-livecode@lists.runrev.com>
Cc: Sean Cole (Pi) <s...@pidigital.co.uk>
Betreff: Re: OT: Does anybody know an "official" h.264 directShow filter for
windows?

Hi Tiemo

WinXP: https://www.microsoft.com/en-us/download/details.aspx?id=507
Windows 7:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd797815(v=vs.85).a
spx
Windows 8 N & KN:
https://www.microsoft.com/en-us/download/details.aspx?id=40744
Windows 10 N & KN:
https://www.microsoft.com/en-us/download/details.aspx?id=49919

The official Intel H.264 SDK:
https://software.intel.com/en-us/articles/mp4avc-decode-using-the-intel-medi
a-sdk

Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
+44(1634)402193
+44(7702)116447
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

eMail Ts & Cs <http://pidigital.co.uk/emailTCs.rtf>   Pi Digital
Productions Ltd is a UK registered limited company, no. 5255609

On 29 August 2017 at 09:13, Tiemo Hollmann TB via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hello,
>
> It is so frustrating after struggling for years with the Quicktime 
> installer on windows, all my hope on the new "native" video player is 
> lost.
>
> Since Windows doesn't support h.264 videos on its old directShow API, 
> you have to install a h.264 codec/filter to playback h.264 videos with 
> LiveCode.
>
> Up to now, I only have found the "LAV Filters" package, which includes 
> an directShow mp4 filter. Generally this works fine, but I have 
> customers with Windows 8.1 and 10 machines, who can't play my videos, 
> the screen just keeps black without notice. Beside of the "K-Lite Mega 
> Codec Pack", which at last only is a bundle for the LAV filters I 
> didn't found any other directShow
> mp4/h.264 filter, not to mention any "official" installer. Has anybody 
> found any other directShow mp4/h.264 filter yet?
>
> On the other hand, since this total black out only happens on certain 
> machines, it could be anything from the video card driver to missing 
> media components in windows. But here also I didn't found yet any hint or
clue.
>
> Thanks for your experiences
>
> Tiemo
>
>
>
>
>
>
>
>
>
> ___
> 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: OT: Does anybody know an "official" h.264 directShow filter for windows?

2017-08-29 Thread Sean Cole (Pi) via use-livecode
Hi Tiemo

WinXP: https://www.microsoft.com/en-us/download/details.aspx?id=507
Windows 7:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd797815(v=vs.85).aspx
Windows 8 N & KN:
https://www.microsoft.com/en-us/download/details.aspx?id=40744
Windows 10 N & KN:
https://www.microsoft.com/en-us/download/details.aspx?id=49919

The official Intel H.264 SDK:
https://software.intel.com/en-us/articles/mp4avc-decode-using-the-intel-media-sdk

Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
+44(1634)402193
+44(7702)116447
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

eMail Ts & Cs <http://pidigital.co.uk/emailTCs.rtf>   Pi Digital
Productions Ltd is a UK registered limited company, no. 5255609

On 29 August 2017 at 09:13, Tiemo Hollmann TB via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hello,
>
> It is so frustrating after struggling for years with the Quicktime
> installer
> on windows, all my hope on the new "native" video player is lost.
>
> Since Windows doesn't support h.264 videos on its old directShow API, you
> have to install a h.264 codec/filter to playback h.264 videos with
> LiveCode.
>
> Up to now, I only have found the "LAV Filters" package, which includes an
> directShow mp4 filter. Generally this works fine, but I have customers with
> Windows 8.1 and 10 machines, who can't play my videos, the screen just
> keeps
> black without notice. Beside of the "K-Lite Mega Codec Pack", which at last
> only is a bundle for the LAV filters I didn't found any other directShow
> mp4/h.264 filter, not to mention any "official" installer. Has anybody
> found
> any other directShow mp4/h.264 filter yet?
>
> On the other hand, since this total black out only happens on certain
> machines, it could be anything from the video card driver to missing media
> components in windows. But here also I didn't found yet any hint or clue.
>
> Thanks for your experiences
>
> Tiemo
>
>
>
>
>
>
>
>
>
> ___
> 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


OT: Does anybody know an "official" h.264 directShow filter for windows?

2017-08-29 Thread Tiemo Hollmann TB via use-livecode
Hello,

It is so frustrating after struggling for years with the Quicktime installer
on windows, all my hope on the new "native" video player is lost.

Since Windows doesn't support h.264 videos on its old directShow API, you
have to install a h.264 codec/filter to playback h.264 videos with LiveCode.

Up to now, I only have found the "LAV Filters" package, which includes an
directShow mp4 filter. Generally this works fine, but I have customers with
Windows 8.1 and 10 machines, who can't play my videos, the screen just keeps
black without notice. Beside of the "K-Lite Mega Codec Pack", which at last
only is a bundle for the LAV filters I didn't found any other directShow
mp4/h.264 filter, not to mention any "official" installer. Has anybody found
any other directShow mp4/h.264 filter yet?

On the other hand, since this total black out only happens on certain
machines, it could be anything from the video card driver to missing media
components in windows. But here also I didn't found yet any hint or clue.

Thanks for your experiences

Tiemo

 

 

 

 

___
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: filter? replace? wildcard? reg exp? help please!

2017-05-19 Thread Thierry Douez via use-livecode
​

Is there life without internet for one week?

- lucky you are connected to the world again!
> Tiemo
>

​Hallo Tiemo,

Except some hurdles with the administration ( sold my old car and bought a
new one) plus being insulted by a couple of stressed and egotist people for
not answering sooner,
I did use this time to clean my garden,
did some house construction and enjoyed
to talk longer with friends in the city :)

But I'll have to work all the week-end now :)

Kind regards,

Thierry
​

> >
> >> put "1 [A] 2 [B] 3." into tText
> >> put  removeBrackets( tText)
> >>
> >
> > I see that the middle section is omitted with my regex, so I forgot to
> > make it non-greedy. But I've forgotten how to do that, something about
> > a question mark, I think?
>
>
> ​Sorry about the delay, we had a thunderstorm which broke all Internet
> network in our area since last Friday.
>
> You can do this in 2 ways:
>
> - make your .* non greedy by adding a '?' suffix
>
> - or modify your regex this way:
>
>"\[ [^\]]*]" which means looking for an open bracket followed by zero
> to any number of chars which are not a close bracket, and last a close
> bracket.
> BTW, no need to escape the last closing bracket; the regex engine is smart
> enough.
>
>
> PCRE library accepts the 2 forms.
>
> HTH,
>
> Thierry
>  ​
>

-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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

AW: filter? replace? wildcard? reg exp? help please!

2017-05-19 Thread Tiemo Hollmann TB via use-livecode
Is there life without internet for one week? - lucky you are connected to the 
world again!
Tiemo


-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag von 
Thierry Douez via use-livecode
Gesendet: Freitag, 19. Mai 2017 13:56
An: How to use LiveCode <use-livecode@lists.runrev.com>
Cc: Thierry Douez <th.do...@gmail.com>
Betreff: Re: filter? replace? wildcard? reg exp? help please!

>
>
>> put "1 [A] 2 [B] 3." into tText
>> put  removeBrackets( tText)
>>
>
> I see that the middle section is omitted with my regex, so I forgot to 
> make it non-greedy. But I've forgotten how to do that, something about 
> a question mark, I think?


​Sorry about the delay, we had a thunderstorm which broke all Internet network 
in our area since last Friday.

You can do this in 2 ways:

- make your .* non greedy by adding a '?' suffix

- or modify your regex this way:

   "\[ [^\]]*]" which means looking for an open bracket followed by zero to any 
number of chars which are not a close bracket, and last a close bracket.
BTW, no need to escape the last closing bracket; the regex engine is smart 
enough.


PCRE library accepts the 2 forms.

HTH,

Thierry
​
--

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage 
___
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: filter? replace? wildcard? reg exp? help please!

2017-05-19 Thread Thierry Douez via use-livecode
>
>
>> put "1 [A] 2 [B] 3." into tText
>> put  removeBrackets( tText)
>>
>
> I see that the middle section is omitted with my regex, so I forgot to
> make it non-greedy. But I've forgotten how to do that, something about a
> question mark, I think?


​Sorry about the delay, we had a thunderstorm which broke all Internet
network
in our area since last Friday.

You can do this in 2 ways:

- make your .* non greedy by adding a '?' suffix

- or modify your regex this way:

   "\[ [^\]]*]" which means looking for an open bracket followed by zero to
any number of chars which are not a close bracket, and last a close bracket.
BTW, no need to escape the last closing bracket; the regex engine is smart
enough.


PCRE library accepts the 2 forms.

HTH,

Thierry
​
-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: filter? replace? wildcard? reg exp? help please!

2017-05-12 Thread J. Landman Gay via use-livecode

On 5/12/17 3:37 PM, Thierry Douez via use-livecode wrote:

This should be a one-line command!
I've typed this post with the new Opera browser
???


Another try with 2 lines:

put "1 [A] 2 [B] 3." into tText
put  removeBrackets( tText)

​Better?


Yes. It's odd that a browser would reformat it that way.

I see that the middle section is omitted with my regex, so I forgot to 
make it non-greedy. But I've forgotten how to do that, something about a 
question mark, I think?


--
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

Re: filter? replace? wildcard? reg exp? help please!

2017-05-12 Thread Thierry Douez via use-livecode
>
>
>>
>>
>>> function removeBrackets pString
>>>   return replacetext(pString,"\[.*\]",empty)
>>> end removeBrackets
>>>
>> ​​
>>
>> What would be the result of next  line:?
>>
>> *put* removeBrackets
>> ​( ​
>> "1 [A] 2 [B] 3."
>> ​)
>>
>
> An error. I did warn about my limited regex skills. :)

So what should it be?
>
> Also, that's a non-standard format for a function.

I've never seen it written that way before.


​

This should be a one-line command!
I've typed this post with the new Opera browser
???


Another try with 2 lines:

put "1 [A] 2 [B] 3." into tText
put  removeBrackets( tText)

​Better?

Thierry​



Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: filter? replace? wildcard? reg exp? help please!

2017-05-12 Thread J. Landman Gay via use-livecode

On 5/12/17 2:08 AM, Thierry Douez via use-livecode wrote:

​Hi,





function removeBrackets pString
  return replacetext(pString,"\[.*\]",empty)
end removeBrackets



​​

What would be the result of next  line:?

*put* removeBrackets
​( ​
"1 [A] 2 [B] 3."
​)


An error. I did warn about my limited regex skills. :) So what should it be?

Also, that's a non-standard format for a function. I've never seen it 
written that way before.


--
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

Re: filter? replace? wildcard? reg exp? help please!

2017-05-12 Thread Thierry Douez via use-livecode
​Hi,



>
> function removeBrackets pString
>   return replacetext(pString,"\[.*\]",empty)
> end removeBrackets
>
>
​​

What would be the result of next  line:?

*put* removeBrackets
​( ​
"1 [A] 2 [B] 3."
​)


Kind regards,

Thierry
​

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: filter? replace? wildcard? reg exp? help please!

2017-05-10 Thread Nicolas Cueto via use-livecode
> Totally OT, but is this Dante, in Spanish??

Yes, and yes. From the verse translation of Ángel Crespo.

--
Nicolas Cueto

On 10 May 2017 at 19:57, Graham Samuel via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Totally OT, but is this Dante, in Spanish??
>
> Just askin’. I am not good with languages, as you can probably tell.
>
> Graham
>
> > On 10 May 2017, at 06:33, J. Landman Gay via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > On 5/9/17 11:16 PM, J. Landman Gay via use-livecode wrote:
> >> On 5/9/17 10:41 PM, Nicolas Cueto via use-livecode wrote:
> >>> Given this snippet...
> >>>
> >>> ---
> >>> CANTO XXXIV
> >>> CÍRCULO IX: TRAIDORES.
> >>> «Vexilla regis prodeunt[307] del Abismo
> >>> hacia nosotros[308], mas delante mira
> >>> 3—dijo el maestro— y los verás tú mismo.»
> >>> ---
> >>>
> >>> ... how do I use LC to remove the square-brackets and any string within
> >>> them, so that the snippet becomes...
> >>>
> >>> ---
> >>> CANTO XXXIV
> >>> CÍRCULO IX: TRAIDORES.
> >>> «Vexilla regis prodeunt del Abismo
> >>> hacia nosotros, mas delante mira
> >>> 3—dijo el maestro— y los verás tú mismo.»
> >>> ---
> >>
> >> This is about the only thing I know how to do with regext. :)
> >>
> >> on fix
> >>  put fld 1 into tText
> >>  put "\[.*\]" into tRegEx
> >>  put replacetext(tText,tRegEx,empty) into fld 2
> >> end fix
> >>
> >
> > You'd probably want it to be a function though:
> >
> > function removeBrackets pString
> >  return replacetext(pString,"\[.*\]",empty)
> > end removeBrackets
> >
> > --
> > 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: filter? replace? wildcard? reg exp? help please!

2017-05-10 Thread Graham Samuel via use-livecode
Totally OT, but is this Dante, in Spanish??

Just askin’. I am not good with languages, as you can probably tell.

Graham

> On 10 May 2017, at 06:33, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 5/9/17 11:16 PM, J. Landman Gay via use-livecode wrote:
>> On 5/9/17 10:41 PM, Nicolas Cueto via use-livecode wrote:
>>> Given this snippet...
>>> 
>>> ---
>>> CANTO XXXIV
>>> CÍRCULO IX: TRAIDORES.
>>> «Vexilla regis prodeunt[307] del Abismo
>>> hacia nosotros[308], mas delante mira
>>> 3—dijo el maestro— y los verás tú mismo.»
>>> ---
>>> 
>>> ... how do I use LC to remove the square-brackets and any string within
>>> them, so that the snippet becomes...
>>> 
>>> ---
>>> CANTO XXXIV
>>> CÍRCULO IX: TRAIDORES.
>>> «Vexilla regis prodeunt del Abismo
>>> hacia nosotros, mas delante mira
>>> 3—dijo el maestro— y los verás tú mismo.»
>>> ---
>> 
>> This is about the only thing I know how to do with regext. :)
>> 
>> on fix
>>  put fld 1 into tText
>>  put "\[.*\]" into tRegEx
>>  put replacetext(tText,tRegEx,empty) into fld 2
>> end fix
>> 
> 
> You'd probably want it to be a function though:
> 
> function removeBrackets pString
>  return replacetext(pString,"\[.*\]",empty)
> end removeBrackets
> 
> -- 
> 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: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread J. Landman Gay via use-livecode

On 5/9/17 11:16 PM, J. Landman Gay via use-livecode wrote:

On 5/9/17 10:41 PM, Nicolas Cueto via use-livecode wrote:

Given this snippet...

---
CANTO XXXIV
CÍRCULO IX: TRAIDORES.
«Vexilla regis prodeunt[307] del Abismo
hacia nosotros[308], mas delante mira
3—dijo el maestro— y los verás tú mismo.»
---

... how do I use LC to remove the square-brackets and any string within
them, so that the snippet becomes...

---
CANTO XXXIV
CÍRCULO IX: TRAIDORES.
«Vexilla regis prodeunt del Abismo
hacia nosotros, mas delante mira
3—dijo el maestro— y los verás tú mismo.»
---


This is about the only thing I know how to do with regext. :)

on fix
  put fld 1 into tText
  put "\[.*\]" into tRegEx
  put replacetext(tText,tRegEx,empty) into fld 2
end fix



You'd probably want it to be a function though:

function removeBrackets pString
  return replacetext(pString,"\[.*\]",empty)
end removeBrackets

--
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

Re: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread Nicolas Cueto via use-livecode
​Thank you everyone. Went with ​Jacqueline's, cause fastest.

--
N. Cueto
___
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: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread J. Landman Gay via use-livecode

On 5/9/17 10:41 PM, Nicolas Cueto via use-livecode wrote:

Given this snippet...

---
CANTO XXXIV
CÍRCULO IX: TRAIDORES.
«Vexilla regis prodeunt[307] del Abismo
hacia nosotros[308], mas delante mira
3—dijo el maestro— y los verás tú mismo.»
---

... how do I use LC to remove the square-brackets and any string within
them, so that the snippet becomes...

---
CANTO XXXIV
CÍRCULO IX: TRAIDORES.
«Vexilla regis prodeunt del Abismo
hacia nosotros, mas delante mira
3—dijo el maestro— y los verás tú mismo.»
---


This is about the only thing I know how to do with regext. :)

on fix
  put fld 1 into tText
  put "\[.*\]" into tRegEx
  put replacetext(tText,tRegEx,empty) into fld 2
end fix

--
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

Re: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread Phil Davis via use-livecode

There is probably an easier way, but this works:

   on mouseUp
put "]" & field 1 into tText
set the lineDelimiter to "["
set the itemDelimiter to "]"
repeat for each line tLine in tText
put item 2 to -1 of tLine after tNewText
end repeat
put tNewText into field 2
   end mouseUp

HTH -
Phil Davis


On 5/9/17 8:41 PM, Nicolas Cueto via use-livecode wrote:

Given this snippet...

---
CANTO XXXIV
CÍRCULO IX: TRAIDORES.
«Vexilla regis prodeunt[307] del Abismo
hacia nosotros[308], mas delante mira
3—dijo el maestro— y los verás tú mismo.»
---

... how do I use LC to remove the square-brackets and any string within
them, so that the snippet becomes...

---
CANTO XXXIV
CÍRCULO IX: TRAIDORES.
«Vexilla regis prodeunt del Abismo
hacia nosotros, mas delante mira
3—dijo el maestro— y los verás tú mismo.»
---

Muchas gracias.

--
Nicolás Cueto
___
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


--
Phil Davis

___
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: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread Peter Bogdanoff via use-livecode
Try—
put your text into tText, then

repeat forever
if offset("[",tText) is not empty then
delete char (offset("[",tText)) to (offset("]",tText)) of tText
else
exit repeat
end repeat



On May 9, 2017, at 8:54 PM, Peter Bogdanoff via use-livecode 
 wrote:

> use offset.
> 
> Peter
> 
> 
> On May 9, 2017, at 8:41 PM, Nicolas Cueto via use-livecode 
>  wrote:
> 
>> Given this snippet...
>> 
>> ---
>> CANTO XXXIV
>> CÍRCULO IX: TRAIDORES.
>> «Vexilla regis prodeunt[307] del Abismo
>> hacia nosotros[308], mas delante mira
>> 3—dijo el maestro— y los verás tú mismo.»
>> ---
>> 
>> ... how do I use LC to remove the square-brackets and any string within
>> them, so that the snippet becomes...
>> 
>> ---
>> CANTO XXXIV
>> CÍRCULO IX: TRAIDORES.
>> «Vexilla regis prodeunt del Abismo
>> hacia nosotros, mas delante mira
>> 3—dijo el maestro— y los verás tú mismo.»
>> ---
>> 
>> Muchas gracias.
>> 
>> --
>> Nicolás Cueto
>> ___
>> 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: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread Peter Bogdanoff via use-livecode
use offset.

Peter


On May 9, 2017, at 8:41 PM, Nicolas Cueto via use-livecode 
 wrote:

> Given this snippet...
> 
> ---
> CANTO XXXIV
> CÍRCULO IX: TRAIDORES.
> «Vexilla regis prodeunt[307] del Abismo
> hacia nosotros[308], mas delante mira
> 3—dijo el maestro— y los verás tú mismo.»
> ---
> 
> ... how do I use LC to remove the square-brackets and any string within
> them, so that the snippet becomes...
> 
> ---
> CANTO XXXIV
> CÍRCULO IX: TRAIDORES.
> «Vexilla regis prodeunt del Abismo
> hacia nosotros, mas delante mira
> 3—dijo el maestro— y los verás tú mismo.»
> ---
> 
> Muchas gracias.
> 
> --
> Nicolás Cueto
> ___
> 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


filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread Nicolas Cueto via use-livecode
Given this snippet...

---
CANTO XXXIV
CÍRCULO IX: TRAIDORES.
«Vexilla regis prodeunt[307] del Abismo
hacia nosotros[308], mas delante mira
3—dijo el maestro— y los verás tú mismo.»
---

... how do I use LC to remove the square-brackets and any string within
them, so that the snippet becomes...

---
CANTO XXXIV
CÍRCULO IX: TRAIDORES.
«Vexilla regis prodeunt del Abismo
hacia nosotros, mas delante mira
3—dijo el maestro— y los verás tú mismo.»
---

Muchas gracias.

--
Nicolás Cueto
___
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: Weirdness with filter (maybe?)

2017-04-20 Thread hh via use-livecode
There is also brilliant work optimized for LC syntax.
By the one and only LC-master of regex, Thierry:

https://sunny-tdz.com/livecode/sunnyrex

> Bob S. wrote:
> Filter, unlike matchtext, in the form you are using, is not using regex. 
> There is a form of
> filter however that does. If you need help with a regex expression, I use a 
> neat little tool
> called RegexMagic. 30 day demo and not too expensive if you use regex 
> expressions on a regular
> basis. (See what I did there?) 


___
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: Weirdness with filter (maybe?)

2017-04-20 Thread Bob Sneidar via use-livecode
Filter, unlike matchtext, in the form you are using, is not using regex. There 
is a form of filter however that does. If you need help with a regex 
expression, I use a neat little tool called RegexMagic. 30 day demo and not too 
expensive if you use regex expressions on a regular basis. (See what I did 
there?) 

Bob S


> On Apr 20, 2017, at 03:20 , Alan via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Try
> 
> filter lines of MyList with ("*" & CharStringX & "*" & tab & "*")
> 
> to get all lines where CharStringX is contained in the first part of the 
> string before the tab.
> 
> 
>> filter lines of MyList with ("*" & CharStringX & "*" & tab)
> 
> HTH
> 
> cheers
> 
> Alan
> ___
> 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: Weirdness with filter (maybe?)

2017-04-20 Thread Alan via use-livecode
Try

filter lines of MyList with ("*" & CharStringX & "*" & tab & "*")

to get all lines where CharStringX is contained in the first part of the string 
before the tab.


> filter lines of MyList with ("*" & CharStringX & "*" & tab)

HTH

cheers

Alan
___
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: Weirdness with filter (maybe?)

2017-04-20 Thread Alex Tweedly via use-livecode

I think it should be

 filter lines of MyList with (charStringX & TAB & *)

i.e. get lines containing this string X followed by TAB followed by anything

Alex

On 20/04/2017 09:22, Quentin Long via use-livecode wrote:

I have a return-delimited list. Each line of this list consists of [some text] & 
tab & [other text]. I want to see all the lines of the list for which [some text] 
contains Character String X. This is obviously a job for the filter command, right? So 
I try this:

filter lines of MyList with ("*" & CharStringX & "*" & tab)

The result I'm expecting is, a list which contains every line of MyList in 
which the [some text] bit contains CharStringX.

The result I get is, a "list" which contains zero lines.

Have tried various alternate forms of the line, including…

filter lines of MyList with ("*" & CharStringX & "*" & numToChar (9))
filter lines of MyList with wildcard pattern ("*" & CharStringX & "*" & tab)
filter lines of MyList matching wildcard pattern ("*" & CharStringX & "*" & tab)

…all of which yield the same results as the original line.

Would appreciate a sanity check: Am I missing some necessary part of the filter syntax? 
Does the filter command even know what to do with the constant "tab"? How 
*does* one filter for a pattern that includes a tab?


"Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length"
 
Read the webcomic at [ http://www.atarmslength.net ]!
 
If you like "At Arm's Length", support it at [ http://www.patreon.com/DarkwingDude ].


___
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

Weirdness with filter (maybe?)

2017-04-20 Thread Quentin Long via use-livecode
I have a return-delimited list. Each line of this list consists of [some text] 
& tab & [other text]. I want to see all the lines of the list for which [some 
text] contains Character String X. This is obviously a job for the filter 
command, right? So I try this:

filter lines of MyList with ("*" & CharStringX & "*" & tab)

The result I'm expecting is, a list which contains every line of MyList in 
which the [some text] bit contains CharStringX.

The result I get is, a "list" which contains zero lines.

Have tried various alternate forms of the line, including…

filter lines of MyList with ("*" & CharStringX & "*" & numToChar (9))
filter lines of MyList with wildcard pattern ("*" & CharStringX & "*" & tab)
filter lines of MyList matching wildcard pattern ("*" & CharStringX & "*" & tab)

…all of which yield the same results as the original line.

Would appreciate a sanity check: Am I missing some necessary part of the filter 
syntax? Does the filter command even know what to do with the constant "tab"? 
How *does* one filter for a pattern that includes a tab?

   
"Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length"

Read the webcomic at [ http://www.atarmslength.net ]!

If you like "At Arm's Length", support it at [ 
http://www.patreon.com/DarkwingDude ].

___
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: LiveCode 8.1 and the Filter enhancements...

2016-09-14 Thread Monte Goulding

> On 15 Sep 2016, at 9:21 AM, Richard Gaskin <ambassa...@fourthworld.com> wrote:
> 
> Would it be worthwhile considering some form of XQuery for that so we could 
> do ranges and other nifty things?

Hi Richard

I considered adding patterns as array paths (a numerically indexed array of 
keys) but I don’t think that’s as flexible or readable as the by clause.

Otherwise you would get some kind of horrible syntax like this to do the same 
thing:
local tPath
put “*” into tPath[1]
put “col2” into tPath[2]
filter elements of tArray with key path tPath matching “some"

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

Re: LiveCode 8.1 and the Filter enhancements...

2016-09-14 Thread Richard Gaskin

Monte Goulding wrote:

> Actually what you are describing is probably better implemented with
> the by clause I have suggested here:
> http://quality.livecode.com/show_bug.cgi?id=18309
>
> You could then:
>
> filter elements of tArray by each[“col2”] is “some”
>
> Or alternatively if you need match “something” and “somewhere”
>
> filter elements of tArray with “some*” by each[“col2”]
>
> Or if you need to do something interesting:
>
> filter elements of tArray by someFunction(each)
>
> function someFunction pArray
> return pArray[“col2”] is “some"
> end someFunction

Would it be worthwhile considering some form of XQuery for that so we 
could do ranges and other nifty things?


--
 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

Re: LiveCode 8.1 and the Filter enhancements...

2016-09-14 Thread Monte Goulding

> On 15 Sep 2016, at 7:06 AM, Paul Dupuis <p...@researchware.com> wrote:
> 
> For those using LC 8.1, and have tried the new filter command's support
> for arrays, I have a question:
> 
> I see you can filter by keys or elements from the documentations, which
> is great, but I don's see how I would do another common item
> 
> Let say I have an array that is a table (a common model) where the rows
> are numeric keys and the columns keys are "field" names. So
> 
> tArray[1]["col1"] some value
> tArray[1]["col2"] some other value
> tArray[2]["col1"] still another value
> tArray[2]["col2"] and yet one more value
> 
> Can I use the new filter command to filter on a specific column and get
> all the rows matching? For example match where ["col2"] contains "some"
> which would only return row 1.
> 
> I realize I can write code to do this (and have). I was wondering if I
> am missing something obvious and there is a way to do this using the new
> filter command enhancements in 1 line.


You aren’t missing anything. Actually what you are describing is probably 
better implemented with the by clause I have suggested here:
http://quality.livecode.com/show_bug.cgi?id=18309 
<http://quality.livecode.com/show_bug.cgi?id=18309>

You could then:

filter elements of tArray by each[“col2”] is “some”

Or alternatively if you need match “something” and “somewhere”

filter elements of tArray with “some*” by each[“col2”]

Or if you need to do something interesting:

filter elements of tArray by someFunction(each)

function someFunction pArray
return pArray[“col2”] is “some"
end someFunction

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

LiveCode 8.1 and the Filter enhancements...

2016-09-14 Thread Paul Dupuis
For those using LC 8.1, and have tried the new filter command's support
for arrays, I have a question:

I see you can filter by keys or elements from the documentations, which
is great, but I don's see how I would do another common item

Let say I have an array that is a table (a common model) where the rows
are numeric keys and the columns keys are "field" names. So

tArray[1]["col1"] some value
tArray[1]["col2"] some other value
tArray[2]["col1"] still another value
tArray[2]["col2"] and yet one more value

Can I use the new filter command to filter on a specific column and get
all the rows matching? For example match where ["col2"] contains "some"
which would only return row 1.

I realize I can write code to do this (and have). I was wondering if I
am missing something obvious and there is a way to do this using the new
filter command enhancements in 1 line.


___
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: New(ish) option on the filter command

2016-07-18 Thread Dr. Hawkins
On Sat, Jul 16, 2016 at 4:10 PM, Alex Tweedly <a...@tweedly.net> wrote:

> It should simply concatenate. Just like
>   put myVar after myOtherVar
> does.
>

I see the logic in that, but just about any conceivable use would be
dealing with items separated by data.

maybe

filter tear with abc after myVar delim by cr


?
-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
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: New(ish) option on the filter command

2016-07-16 Thread Alex Tweedly

On 16/07/2016 00:22, [-hh] wrote:


Usually one would do
put cr & resultOfFilter2 after resultOfFilter1
Well, that depends ... if the first one had produced no matches, then 
this statement would introduce a spurious blank line.

So the problem could be:

What should "filter .. after tVar" exactly do?

It should simply concatenate. Just like
  put myVar after myOtherVar
does.

If I had done it the old-fashioned way, like
   filter t with "*.jpg" into t1
   filter t with "*.jpeg" into t2
   put t1 & CR & t2 into myFinalVar
then I would have needed to know that files(), and filter, both omit the 
final CR, and deal with it accordingly.
So there's no reason for "filter ... after myVar" to try to be any 
cleverer than "put ... after myVar"




Simply concatenate?
Or use the current linedelimiter as "connector"?

-- Alex.
P.S. I could, of course, revive my old rant about the need for *proper* 
lists in LC Script, rather than always mimicking them as lines where we 
need to deal with trailing, or intermediate, delimiters, etc. Then we 
could avoid complexities like

function concatenateLines p1, p2
  put p1 into tResult
  if p1 is not empty AND p2 is not empty AND the last char of p1 <> CR 
then put CR after tResult

  put p2 after tResult
  return tResult
end concatenateLines


Alex Tweedly wrote

OK, so it's not that new - it was added in 6.1 :-)

filter now allows you to specify a "target container", e.g.

filter myVar with "*.livecode"  into tStacks


Would it be a reasonable enhancement request to allow not just "into",
but also "after" and "before" ?

e.g.

   put files() into t

   filter t with "*.jpg" into tFiles

   filter t with "*.jpeg" after tFiles

etc.

btw - if you are hopeful and just try the "after variant", it doesn't
give you an error - it simply ignores the "after targetContainer" part,
and filters the source container. Seems to me that's a bug - anyone
agree and I'll enter it as such ?

-- Alex.





___
use-livecode mailing list
use-livecode@.runrev
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/New-ish-option-on-the-filter-command-tp4706763p4706765.html
Sent from the Revolution - User mailing list archive at Nabble.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


  1   2   3   >