rant: truewordOffset

2021-04-19 Thread Mark Wieder via use-livecode

I'm also annoyed at truewordOffset.
Consider this:

you can get an offset in truewords (the number of truewords that occur 
before the given argument,


but you can't get an offset *to* a given trueword.

put truewordOffset(tString, tText, tSkip) will give you a value in 
truewords. And you can plug that value into tSkip for the next iteration 
to find the next occurence of the string. But only a string. You can't say


put truewordOffset(trueword tTrueWord, tText, tSkip)

And yes, I've got a one-line workaround for it, but what use is this on 
its own? You can't just say


put truewordOffset("font", tText) into tOffset

because it might encounter "fontTable" first.

I can't come up with a use for truewordOffset the way it currently 
exists, and it isn't used in any of the IDE stacks, so apparently the 
team didn't have a use for it either.


--
 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: lineOffset wildcard

2021-04-19 Thread Mark Wieder via use-livecode



I'll try benchmarking this against Jacque's suggestion of matchChunk. 
Filter is normally pretty fast, but I'll have to use the regex version, 
and I'm not sure what the speed implications will be.


Benchmark result averages over 10 runs on a 2700-line script:

filter lines of script 2612.6ms
filter script  2572.1ms
matchChunk 2424.3ms

the code:

put "^local.*"&tLocal&".*" into tRegexString

put matchChunk(tScript, tRegexString, tStartPos, tEndPos) into tFound?
if tFound? then
   put the number of lines in char 1 to tStartPos of tScript into tLine
end if

filter tScript with regex tRegexString into tFoundScript
# alternate: no appreciable difference in timing
# filter tScript with "local*"&tLocal&"*" into tFoundScript
if tFoundScript is not empty then
   put lineoffset(tFoundScript, tScript) into tLine
end if

So matchChunk plus "the number of lines" is faster by ~150 milliseconds 
over 2700 lines of text than filter plus lineOffset.


--
 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: lineOffset wildcard

2021-04-19 Thread Mark Wieder via use-livecode

On 4/19/21 1:02 PM, Ken Ray wrote:
On Apr 19, 2021, at 1:47 PM, Mark Wieder via use-livecode 
mailto:use-livecode@lists.runrev.com>> 
wrote:


On 4/19/21 11:04 AM, J. Landman Gay via use-livecode wrote:

I don't think lineoffset supports wildcards, but you could do it with 
matchChunk.


Ah! matchChunk and the the number of lines of... etc...
That should do it.


Another way to do it is to use 'filter' to get the text of the line that 
matches your wildcard, and then 'lineOffset' to find that line:


put tScript into tTemp
filter tTemp with ("local*" & tFunctionName & "*")
put lineOffset((cr & tTemp & cr),(cr & tScript & cr)) into tPos

Not sure if 'filter' is faster than 'matchChunk' when dealing with large 
scripts, but I have a feeling it might be...


Thanks, Ken.
I'll try benchmarking this against Jacque's suggestion of matchChunk. 
Filter is normally pretty fast, but I'll have to use the regex version, 
and I'm not sure what the speed implications will be.



--
 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: lineOffset wildcard

2021-04-19 Thread Mark Wieder via use-livecode

On 4/19/21 3:02 PM, Bob Sneidar via use-livecode wrote:

IOC I guess I did misunderstand after all.


Nah... I should have worded it differently to 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: lineOffset wildcard

2021-04-19 Thread Bob Sneidar via use-livecode
IOC I guess I did misunderstand after all.

Bob S


On Apr 19, 2021, at 12:32 PM, Mark Wieder via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

On 4/19/21 12:11 PM, Bob Sneidar via use-livecode wrote:
Someone needs to update the dictionary then.
wholeMatches
Syntax
set the wholeMatches to {true | false}
Summary
Specifies whether the lineOffset, wordOffset, and itemOffset functions search 
only for entire lines, words, or items.

Here's what I meant:

setting the wholeMatches to true will match the input string verbatim, without 
regard to wildcards. So

lineOffset("local tFunction", ttext) will only match
local tFunction
and
lineOffset("local*tFunction", tText) will only match
local*tFunction
not
local tFunction
and not
local someThing, tFunction, somethingElse

--
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: lineOffset wildcard

2021-04-19 Thread Ken Ray via use-livecode
> On Apr 19, 2021, at 1:47 PM, Mark Wieder via use-livecode 
>  wrote:
> 
> On 4/19/21 11:04 AM, J. Landman Gay via use-livecode wrote:
> 
>> I don't think lineoffset supports wildcards, but you could do it with 
>> matchChunk.
> 
> Ah! matchChunk and the the number of lines of... etc...
> That should do it.

Another way to do it is to use 'filter' to get the text of the line that 
matches your wildcard, and then 'lineOffset' to find that line:

put tScript into tTemp
filter tTemp with ("local*" & tFunctionName & "*")
put lineOffset((cr & tTemp & cr),(cr & tScript & cr)) into tPos

Not sure if 'filter' is faster than 'matchChunk' when dealing with large 
scripts, but I have a feeling it might be...


Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Website: https://www.sonsothunder.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: lineOffset wildcard

2021-04-19 Thread Mark Wieder via use-livecode

On 4/19/21 12:11 PM, Bob Sneidar via use-livecode wrote:

Someone needs to update the dictionary then.

wholeMatches

Syntax
set the wholeMatches to {true | false}

Summary
Specifies whether the lineOffset, wordOffset, and itemOffset functions search 
only for entire lines, words, or items.


Here's what I meant:

setting the wholeMatches to true will match the input string verbatim, 
without regard to wildcards. So


lineOffset("local tFunction", ttext) will only match
local tFunction
and
lineOffset("local*tFunction", tText) will only match
local*tFunction
not
local tFunction
and not
local someThing, tFunction, somethingElse

--
 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: lineOffset wildcard

2021-04-19 Thread Bob Sneidar via use-livecode
Someone needs to update the dictionary then. 

wholeMatches

Syntax
set the wholeMatches to {true | false}

Summary
Specifies whether the lineOffset, wordOffset, and itemOffset functions search 
only for entire lines, words, or items.

Bob S

> On Apr 19, 2021, at 11:49 , Mark Wieder via use-livecode 
>  wrote:
> 
> On 4/19/21 11:13 AM, Bob Sneidar via use-livecode wrote:
>> Why even embed the function?
>> put "local" & tString & functionName() into tSearchString
>> set wholeMatches to true
>> put lineOffset(tSearchString) into tLine
>> Or am I misunderstanding the problem (again)? :-)
> 
> Been there.
> the wholematches doesn't affect the offset functions.
> 
> -- 
> 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: lineOffset wildcard

2021-04-19 Thread Mark Wieder via use-livecode

On 4/19/21 11:13 AM, Bob Sneidar via use-livecode wrote:

Why even embed the function?

put "local" & tString & functionName() into tSearchString
set wholeMatches to true
put lineOffset(tSearchString) into tLine

Or am I misunderstanding the problem (again)? :-)


Been there.
the wholematches doesn't affect the offset functions.

--
 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: lineOffset wildcard

2021-04-19 Thread Mark Wieder via use-livecode

On 4/19/21 11:04 AM, J. Landman Gay via use-livecode wrote:

I don't think lineoffset supports wildcards, but you could do it with 
matchChunk.




Ah! matchChunk and the the number of lines of... etc...
That should do it.

--
 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: Android splash and icon

2021-04-19 Thread J. Landman Gay via use-livecode
It's unlikely if the phone makes no calls, doesn't download any apps, and has location, 
targeted ads, and other relevant permissions turned off. I have four test phones, only one has 
an actual phone number, and the other three only connect to my Mac and are largely invisible to 
the world.


I keep my tin foil hat on all the time. Up until Google required us to create a Google+ account 
(ick) I looked up what Google knew about me (which they don't show you any more.) Google 
thought I was a 35-year-old male and had no other info. Tin foil hats work!


On 4/19/21 10:57 AM, Bob Sneidar via use-livecode wrote:

They can still find you and know everything about you. Unless your tin foil had 
is in working order. ;-)

Bob S



On Apr 16, 2021, at 03:23 , Klaus major-k via use-livecode 
 wrote:

P.S.
Yes, I bought me a used Samsung Galaxy J7, my first cellphone ever,
and I am currently making my first steps on mobile.

However the phone is just for testing with LC, I do not intend to actually
make phone calls with it. :-)



--
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: lineOffset wildcard

2021-04-19 Thread Bob Sneidar via use-livecode
Why even embed the function? 

put "local" & tString & functionName() into tSearchString
set wholeMatches to true
put lineOffset(tSearchString) into tLine

Or am I misunderstanding the problem (again)? :-)

Bob S


> On Apr 19, 2021, at 11:04 , J. Landman Gay via use-livecode 
>  wrote:
> 
> On 4/19/21 11:29 AM, Mark Wieder via use-livecode wrote:
>> I'm sure I'm missing something simple here but...
>> I need to use a wildcard in the lineOffset function but I can't seem to find 
>> the correct invocation.
>> put lineoffset("local*"&tFunctionName, tScript) into tPos
>> always returns zero
>> put lineoffset(tFunctionName, tScript) into tPos
>> of course returns a line number, but possibly not the right one
>> put lineoffset("local"&&tFunctionName, tScript) into tPos
>> gives me the correct line in some cases but fails for
>> local tSomeFunction,tOtherFunction
>> Can anyone give me the correct syntax for using a wildcard string as an 
>> argument to lineOffset? Thanks in advance - I've spent enough time on my own 
>> trying to figger this out.
> 
> I don't think lineoffset supports wildcards, but you could do it with 
> matchChunk.
> 
> -- 
> 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: lineOffset wildcard

2021-04-19 Thread J. Landman Gay via use-livecode

On 4/19/21 11:29 AM, Mark Wieder via use-livecode wrote:

I'm sure I'm missing something simple here but...

I need to use a wildcard in the lineOffset function but I can't seem to find the correct 
invocation.


put lineoffset("local*"&tFunctionName, tScript) into tPos
always returns zero

put lineoffset(tFunctionName, tScript) into tPos
of course returns a line number, but possibly not the right one

put lineoffset("local"&&tFunctionName, tScript) into tPos
gives me the correct line in some cases but fails for
local tSomeFunction,tOtherFunction

Can anyone give me the correct syntax for using a wildcard string as an argument to lineOffset? 
Thanks in advance - I've spent enough time on my own trying to figger this out.




I don't think lineoffset supports wildcards, but you could do it with 
matchChunk.

--
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: lineOffset wildcard

2021-04-19 Thread Bob Sneidar via use-livecode
I think either matchText, or else wholematches used with some form of xOffset 
is what you want. 

Bob S


> On Apr 19, 2021, at 09:29 , Mark Wieder via use-livecode 
>  wrote:
> 
> I'm sure I'm missing something simple here but...
> 
> I need to use a wildcard in the lineOffset function but I can't seem to find 
> the correct invocation.
> 
> put lineoffset("local*"&tFunctionName, tScript) into tPos
> always returns zero
> 
> put lineoffset(tFunctionName, tScript) into tPos
> of course returns a line number, but possibly not the right one
> 
> put lineoffset("local"&&tFunctionName, tScript) into tPos
> gives me the correct line in some cases but fails for
> local tSomeFunction,tOtherFunction
> 
> Can anyone give me the correct syntax for using a wildcard string as an 
> argument to lineOffset? Thanks in advance - I've spent enough time on my own 
> trying to figger this out.
> 
> -- 
> 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: Multiple stacks showing at once on mobile

2021-04-19 Thread Brian Milby via use-livecode
Currently only one at a time, even if it does not render with content covering 
the whole screen (some full screen modes have black borders)

Sent from my iPhone

> On Apr 19, 2021, at 11:54 AM, Gabe J via use-livecode 
>  wrote:
> 
> Hey All,
> 
> Is it possible to have more than one stack showing at a time on mobile? Or
> is it always one stack showing at full-screen?
> 
> Gabe
> ___
> use-livecode mailing list
> use-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


lineOffset wildcard

2021-04-19 Thread Mark Wieder via use-livecode

I'm sure I'm missing something simple here but...

I need to use a wildcard in the lineOffset function but I can't seem to 
find the correct invocation.


put lineoffset("local*"&tFunctionName, tScript) into tPos
always returns zero

put lineoffset(tFunctionName, tScript) into tPos
of course returns a line number, but possibly not the right one

put lineoffset("local"&&tFunctionName, tScript) into tPos
gives me the correct line in some cases but fails for
local tSomeFunction,tOtherFunction

Can anyone give me the correct syntax for using a wildcard string as an 
argument to lineOffset? Thanks in advance - I've spent enough time on my 
own trying to figger this out.


--
 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: Android splash and icon

2021-04-19 Thread Bob Sneidar via use-livecode
They can still find you and know everything about you. Unless your tin foil had 
is in working order. ;-)

Bob S


> On Apr 16, 2021, at 03:23 , Klaus major-k via use-livecode 
>  wrote:
> 
> P.S.
> Yes, I bought me a used Samsung Galaxy J7, my first cellphone ever,
> and I am currently making my first steps on mobile.
> 
> However the phone is just for testing with LC, I do not intend to actually 
> make phone calls with it. :-)


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


Multiple stacks showing at once on mobile

2021-04-19 Thread Gabe J via use-livecode
Hey All,

Is it possible to have more than one stack showing at a time on mobile? Or
is it always one stack showing at full-screen?

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