I have started looking at these two.
Progress Bar
The concept seems fine, but I would like to add some refinements.
1) See my
Run Time & Memory Use Advice ~ Progress Bar.
I would like to encapsulate this feature in the prototype function, and will update the code appropriately.
2) I prefer the gauge to show elapsed time as well as percentage, but this also has a run time impact.
Is there a way of choosing one of two alternative
Step functions when the closure function is constructed?
I will experiment with some ideas.
3) I have some other refinements of the IUP dialogue, such as button colour, and window positioning.
I will update the code appropriately.
Search and Return Result Set
I am struggling a little with the lack of comments, but here goes:
1) On line 113 should
pWhole be
pmWhole?
If so, the lines 115 & 116 can be deleted.
On line 127
strReplaceWith3 is undefined (as it was in V1.3) and I think can be deleted.
The rest of the code looks and runs OK, except as noted below, but I have not inspected it in depth.
2) If the
Search For: string is 'popular' like the letter
e and the GEDCOM is moderately large, the Plugin can take a long time, and FH says
(Not Responding).
The old V1.3 does not have this problem!!!
Making the corrections in 1) above seems to fix the problem.
3) V1.4 is finding significantly less matches than V1.3.
I am investigating why ... found it!
V1.4 is not finding trailing matches.
Line 111 should be
strSearch = nocase(strSearch)
In the next few lines the right-hand sides should use
strSearch instead of
strSearchFor
4) Neither version copes with 'magic' characters in
Plain Text Search mode.
(Also V1.3 does not work with
Case Sensitive ticked)
V1.4 line 108 needs
if pmPlain == 1 then strSearch = strPlainText(strSearch) end inserting.
5) Debugging Closure Prototype Functions is not supported!
For example in v1.4 put a break point inside the anonymous function inside
newSearch.
None of the variable such as
iPos,iPos2,iPos3 appear in the Variables pane bottom right.