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

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!

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

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

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

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.

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

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

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

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

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*", tScript) into tPos always returns zero put

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

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*", tScript) into tPos always returns zero put lineoffset(tFunctionName, tScript) into tPos of course returns a line