Re: Setting conditional breakpoints

2019-06-21 Thread Tom Glod via use-livecode
oh you can open up the engine to do other handlers by using "in time"

I use it all the time..I have a message checking hotkeys clipboard
changes and it works beautifully.


on CheckIfVisible
if the visible of defaultstack = true then
send "CheckIfVisible" to defaultstack in 100 milliseconds
else
end if
end CheckIfVisible

On Fri, Jun 21, 2019 at 7:09 PM Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> That would be true if the engine was multithreaded. As it is, I am trying
> to find the line of script that is changing the property, and until the
> script terminates, no other script can run.
>
> Bob S
>
>
> > On Jun 21, 2019, at 15:56 , Tom Glod via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > well it can be done just have a handler that checks the condition every x
> > millisecondsif true ...breakpoint..if falseresend message.
> >
> > On Fri, Jun 21, 2019 at 6:46 PM Bob Sneidar via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
>
>
> ___
> use-livecode mailing list
> use-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: Setting conditional breakpoints

2019-06-21 Thread J. Landman Gay via use-livecode
Set a breakpoint, right click it, choose condition, and fill out the 
dialog. That's how I usually do it.

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


In the breakpoints tab of the script editor, if you right click the lower 
pane, you can create conditional breakpoints. For instance if the value of 
a variable is something. I have never gotten them to work, and I find I am 
needing this more and more.


Bob S


On Jun 21, 2019, at 15:26 , dunbarx--- via use-livecode 
 wrote:


Not sure what you could mean.
on mouseUp  if the mouseLoc is within the rect of btn 3 then breakPoint   
if the visible  of btn 3 then breakPoint   if the...



Surely I am missing this.
Craig



___
use-livecode mailing list
use-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 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: Setting conditional breakpoints

2019-06-21 Thread Bob Sneidar via use-livecode
That would be true if the engine was multithreaded. As it is, I am trying to 
find the line of script that is changing the property, and until the script 
terminates, no other script can run. 

Bob S


> On Jun 21, 2019, at 15:56 , Tom Glod via use-livecode 
>  wrote:
> 
> well it can be done just have a handler that checks the condition every x
> millisecondsif true ...breakpoint..if falseresend message.
> 
> On Fri, Jun 21, 2019 at 6:46 PM Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 


___
use-livecode mailing list
use-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: Setting conditional breakpoints

2019-06-21 Thread Bob Sneidar via use-livecode
https://quality.livecode.com/show_bug.cgi?id=22203

> On Jun 21, 2019, at 15:46 , Bob Sneidar via use-livecode 
>  wrote:
> 
> OK looks like setting a breakpoint on a property change like the visible of a 
> stack can't be done. Might be a nice addition though. Let's say you have a 
> custom property that keeps getting corrupted (by which I mean it contains bad 
> data) and you want to catch it in the act. Wouldn't it be nice to be able to 
> set a breakpoint for a property like you can for a variable? 
> 
> I'll file an enhancement request. 
> 
> 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: Setting conditional breakpoints

2019-06-21 Thread Tom Glod via use-livecode
well it can be done just have a handler that checks the condition every x
millisecondsif true ...breakpoint..if falseresend message.

On Fri, Jun 21, 2019 at 6:46 PM Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> OK looks like setting a breakpoint on a property change like the visible
> of a stack can't be done. Might be a nice addition though. Let's say you
> have a custom property that keeps getting corrupted (by which I mean it
> contains bad data) and you want to catch it in the act. Wouldn't it be nice
> to be able to set a breakpoint for a property like you can for a variable?
>
> I'll file an enhancement request.
>
> Bob S
>
>
> > On Jun 21, 2019, at 15:32 , Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > In the breakpoints tab of the script editor, if you right click the
> lower pane, you can create conditional breakpoints. For instance if the
> value of a variable is something. I have never gotten them to work, and I
> find I am needing this more and more.
> >
> > 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
>
___
use-livecode mailing list
use-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: Setting conditional breakpoints

2019-06-21 Thread Bob Sneidar via use-livecode
OK looks like setting a breakpoint on a property change like the visible of a 
stack can't be done. Might be a nice addition though. Let's say you have a 
custom property that keeps getting corrupted (by which I mean it contains bad 
data) and you want to catch it in the act. Wouldn't it be nice to be able to 
set a breakpoint for a property like you can for a variable? 

I'll file an enhancement request. 

Bob S


> On Jun 21, 2019, at 15:32 , Bob Sneidar via use-livecode 
>  wrote:
> 
> In the breakpoints tab of the script editor, if you right click the lower 
> pane, you can create conditional breakpoints. For instance if the value of a 
> variable is something. I have never gotten them to work, and I find I am 
> needing this more and more. 
> 
> 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: Setting conditional breakpoints

2019-06-21 Thread Bob Sneidar via use-livecode
In the breakpoints tab of the script editor, if you right click the lower pane, 
you can create conditional breakpoints. For instance if the value of a variable 
is something. I have never gotten them to work, and I find I am needing this 
more and more. 

Bob S


> On Jun 21, 2019, at 15:26 , dunbarx--- via use-livecode 
>  wrote:
> 
> Not sure what you could mean.
> on mouseUp  if the mouseLoc is within the rect of btn 3 then breakPoint   if 
> the visible  of btn 3 then breakPoint   if the...
> 
> 
> Surely I am missing this.
> Craig


___
use-livecode mailing list
use-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: Setting conditional breakpoints

2019-06-21 Thread dunbarx--- via use-livecode
Not sure what you could mean.
on mouseUp  if the mouseLoc is within the rect of btn 3 then breakPoint   if 
the visible  of btn 3 then breakPoint   if the...


Surely I am missing this.
Craig

-Original Message-
From: Bob Sneidar via use-livecode 
To: How to use LiveCode 
Cc: Bob Sneidar 
Sent: Fri, Jun 21, 2019 5:43 pm
Subject: Setting conditional breakpoints

Hi all. 

How do I set a conditional breakpoint based upon a property? I tried using the 
visible of stack "Forms Generator" is true, but I cannot enable the breakpoint 
and it says there is no condition, even though there it is!

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
___
use-livecode mailing list
use-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


Setting conditional breakpoints

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

How do I set a conditional breakpoint based upon a property? I tried using the 
visible of stack "Forms Generator" is true, but I cannot enable the breakpoint 
and it says there is no condition, even though there it is!

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: 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: Help with drawing in LiveCode...

2019-06-21 Thread Paul Dupuis via use-livecode

Posted on forums at http://forums.livecode.com/viewtopic.php?f=8=32779

On 6/21/2019 11:01 AM, dunbarx--- via use-livecode wrote:

Again, my drawing gadget creates, sizes, places and dimensions graphics, 
simulating a CAD drawing.
You are still focused on tool switching and control selecting. That is fine, 
but is that the main and only issue for you? We can work on that, the goal 
being that you modify the current behavior of LC to the behavior of the old one 
you are used to.
I do not need that, since the entirety of my drawing is created under script 
control. So may I request that you post to the forum? I am much more 
comfortable there, and we can all propose handlers that will restore the old 
way.
Did you try the handler I posted earlier? It is a good start.
Craig


-Original Message-
From: Paul Dupuis via use-livecode 
To: use-livecode 
Cc: Paul Dupuis 
Sent: Fri, Jun 21, 2019 9:29 am
Subject: Re: Help with drawing in LiveCode...

On 6/20/2019 11:34 PM, dunbarx--- via use-livecode wrote:

I implemented a fairly complex drawing module to a stack we use all the time. 
It isn't CAD, but it looks like it, albeit rather less professional looking 
than, say, AutoCad or SoldWorks would produce.
We send these drawings out daily to clients. They are based on data calculated 
within the stack, and use graphic objects galore.
But our drawings are one-way, that is, once drawn, they are complete, and are 
forwarded as PDF's. You are looking to be able to manipulate objects (in CAD 
parlance) live on screen. In a CAD environment an object that has been selected 
remains so, regardless of tool or property changes, until either nothing is 
selected or one or more (other or additional) objects are explicitly selected.
This should not be a problem, once some tools are in place, such as the one you 
are asking for with auto re-selection of controls based on recent activity. But 
that is just gadgetry, and once set up, should allow you to do whatever you 
want to.
I would be glad to show you what I make, if that will at least give you an idea 
of how far you can take drawing in LC. But remember, LC is not a drawing or CAD 
program. But you can make it act like one. You just have to change some of the 
built-in rules.
Craig


Thank you. You example sounds closes to what I am looking for. The old
stack I have uses a technique of switching the tool from the browse tool
(when a user need to click on tool icons or menus or whatever to the
appropriate vector drawing tool when the mouse is over the drawing area,
including the pointer tool for selecting, dragging, or resizing existing
graphic objects created using other tools.

The difference is, in the old stack under LC4.6.4 of an object is
selected (say a rectangle) and the tool is set back to browse to click
on a color palette (or whatever), the object remains selected. However,
under LC9 it does not. Or if it is something in the old code of the
stack I can't figure out what. That's why I am looking for an example to
learn from.

I'd appreciate taking a look at your stack.


___
use-livecode mailing list
use-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 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:

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: Hidden Windows keep re-showing

2019-06-21 Thread Bob Sneidar via use-livecode
I think I did that too. That is probably what fixed it. 

Bob S


> On Jun 21, 2019, at 08:24 , Ralph DiMola via use-livecode 
>  wrote:
> 
> I've fixed it by clearing all breakpoints. Maybe there's common thread...
> 
> Ralph DiMola


___
use-livecode mailing list
use-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: Hidden Windows keep re-showing

2019-06-21 Thread Ralph DiMola via use-livecode
I've fixed it by clearing all breakpoints. Maybe there's common thread...

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, June 21, 2019 11:12 AM
To: How to use LiveCode
Cc: Bob Sneidar
Subject: Re: Hidden Windows keep re-showing

NVM I think I found it. For some reason I was unable to trace because
neither soft or hard breakpoints were causing the code execution to pause!
Even after a reboot. What fixed it (I think) is turning off debugging and
then turning it back on. I think I remember someone else having this issue. 

Bob S


> On Jun 20, 2019, at 14:35 , Bob Sneidar via use-livecode
 wrote:
> 
> Hi all. I'm having fits here. Just before I open a stack modally, I hide
another stack. But the hidden stack keeps re-showing itself! Is there an
event I can trap for when a window is shown? I need to find what is doing it
and I have already scoured and traced the code and attempted to step through
it with breakpoints set everywhere. I can't find it. 
> 
> 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


___
use-livecode mailing list
use-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: Hidden Windows keep re-showing

2019-06-21 Thread Bob Sneidar via use-livecode
NVM I think I found it. For some reason I was unable to trace because neither 
soft or hard breakpoints were causing the code execution to pause! Even after a 
reboot. What fixed it (I think) is turning off debugging and then turning it 
back on. I think I remember someone else having this issue. 

Bob S


> On Jun 20, 2019, at 14:35 , Bob Sneidar via use-livecode 
>  wrote:
> 
> Hi all. I'm having fits here. Just before I open a stack modally, I hide 
> another stack. But the hidden stack keeps re-showing itself! Is there an 
> event I can trap for when a window is shown? I need to find what is doing it 
> and I have already scoured and traced the code and attempted to step through 
> it with breakpoints set everywhere. I can't find it. 
> 
> 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: iOS First App

2019-06-21 Thread Marty Knapp via use-livecode
Thanks Ralph.

Marty


> On Jun 20, 2019, at 6:23 PM, Ralph DiMola via use-livecode 
>  wrote:
> 
> Hey Marty...
> 
> 1) You can run up to 100 "test" devices without having to publish to the
> store. You will have to rebuild it once a year when your development
> certificate is renewed.
> 2) I gave to 50,000 foot overview of what you need to do to get an app up
> and running(iOS and Android) at this year's conference along with handlers
> to do the icons and splash screens. You can ask support on how to get this.
> The basic concept still stands.
> Create/download/install a development iOS certificate to your Mac.  Create
> an app ID. This allows you to create a provisioning profile that Xcode
> downloads for use by LiveCode.
> 3) If you have a URL to the file then it's child's play  pointing to a file") into myVar>
> 4) Putting text into an email is easy(mobileComposeMail).
> 
> 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 Marty Knapp via use-livecode
> Sent: Thursday, June 20, 2019 6:38 PM
> To: Use Livecode
> Cc: Marty Knapp
> Subject: iOS First App
> 
> I'm thinking of diving into my first iOS app. I'd like to adapt my existing
> desktop LC-based customer database so I can take care of customers when I'm
> out and about. The iOS app would just be for me and NOT be distributed. The
> actual data is in a text file and resides in Dropbox. I do have an Apple
> Developer account.
> 
> Can anyone tell me:
> 
> 1) Can I build an app just for myself and have it *perpetually* on my
> iPhone? Any caveats?
> 
> 2) Is there a good tutorial somewhere to help me get started on this? Looks
> like the lessons on the Livecode site are kind of old - still relevant?
> 
> As far as capabilities, it just needs:
> 1) to be able to read the text file in Dropbox
> 2) to be able to copy text (to paste into an email)
> 
> It will most likely just be used in the portrait orientation, so all-in-all
> a very simple app.
> 
> Marty
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Help with drawing in LiveCode...

2019-06-21 Thread dunbarx--- via use-livecode
Again, my drawing gadget creates, sizes, places and dimensions graphics, 
simulating a CAD drawing.
You are still focused on tool switching and control selecting. That is fine, 
but is that the main and only issue for you? We can work on that, the goal 
being that you modify the current behavior of LC to the behavior of the old one 
you are used to. 
I do not need that, since the entirety of my drawing is created under script 
control. So may I request that you post to the forum? I am much more 
comfortable there, and we can all propose handlers that will restore the old 
way.
Did you try the handler I posted earlier? It is a good start.
Craig


-Original Message-
From: Paul Dupuis via use-livecode 
To: use-livecode 
Cc: Paul Dupuis 
Sent: Fri, Jun 21, 2019 9:29 am
Subject: Re: Help with drawing in LiveCode...

On 6/20/2019 11:34 PM, dunbarx--- via use-livecode wrote:
> I implemented a fairly complex drawing module to a stack we use all the time. 
> It isn't CAD, but it looks like it, albeit rather less professional looking 
> than, say, AutoCad or SoldWorks would produce.
> We send these drawings out daily to clients. They are based on data 
> calculated within the stack, and use graphic objects galore.
> But our drawings are one-way, that is, once drawn, they are complete, and are 
> forwarded as PDF's. You are looking to be able to manipulate objects (in CAD 
> parlance) live on screen. In a CAD environment an object that has been 
> selected remains so, regardless of tool or property changes, until either 
> nothing is selected or one or more (other or additional) objects are 
> explicitly selected.
> This should not be a problem, once some tools are in place, such as the one 
> you are asking for with auto re-selection of controls based on recent 
> activity. But that is just gadgetry, and once set up, should allow you to do 
> whatever you want to.
> I would be glad to show you what I make, if that will at least give you an 
> idea of how far you can take drawing in LC. But remember, LC is not a drawing 
> or CAD program. But you can make it act like one. You just have to change 
> some of the built-in rules.
> Craig
>

Thank you. You example sounds closes to what I am looking for. The old 
stack I have uses a technique of switching the tool from the browse tool 
(when a user need to click on tool icons or menus or whatever to the 
appropriate vector drawing tool when the mouse is over the drawing area, 
including the pointer tool for selecting, dragging, or resizing existing 
graphic objects created using other tools.

The difference is, in the old stack under LC4.6.4 of an object is 
selected (say a rectangle) and the tool is set back to browse to click 
on a color palette (or whatever), the object remains selected. However, 
under LC9 it does not. Or if it is something in the old code of the 
stack I can't figure out what. That's why I am looking for an example to 
learn from.

I'd appreciate taking a look at your stack.


___
use-livecode mailing list
use-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: Help with drawing in LiveCode...

2019-06-21 Thread hh via use-livecode
http://forums.livecode.com/viewtopic.php?p=139080#p139080

> > hh wrote:
> > Here is a very simple drawing stack made once for testing the
> > HTML5 standalone builder.
> >
> > http://hyperhh.de/html5/krikelKrakel2a-8.0.2X.html
> >
> Paul D. wrote:
> That could be a helpful example. Thank you, but how do I download the 
> actual stack?


___
use-livecode mailing list
use-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: Help with drawing in LiveCode...

2019-06-21 Thread Paul Dupuis via use-livecode

On 6/21/2019 4:54 AM, hh via use-livecode wrote:

Here is a very simple drawing stack made once for testing the
HTML5 standalone builder.

http://hyperhh.de/html5/krikelKrakel2a-8.0.2X.html


That could be a helpful example. Thank you, but how do I download the 
actual stack?


___
use-livecode mailing list
use-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: ImageStatistics_v160

2019-06-21 Thread hh via use-livecode
In case you downloaded v160:
[Version 160 had an error in the javascript for listing the (R,G,B)-triplets
(was counting some green for red)]

So please update!

Download "ImageStatistics_v165" from "Sample Stacks" or using
http://livecodeshare.runrev.com/stack/882/



___
use-livecode mailing list
use-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:

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: Help with drawing in LiveCode...

2019-06-21 Thread hh via use-livecode
Here is a very simple drawing stack made once for testing the
HTML5 standalone builder.

http://hyperhh.de/html5/krikelKrakel2a-8.0.2X.html

> Paul D. wrote:

> ... need a sample drawing stack ...
> Not a paint stack, but one that uses graphic objects.

___
use-livecode mailing list
use-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