diff --git a/Source/BuildGoFish.h b/Source/BuildGoFish.h index 0f5e206..020baa7 100644 --- a/Source/BuildGoFish.h +++ b/Source/BuildGoFish.h @@ -1,10 +1,10 @@ #DEFINE GOFISH_APP_NAME 'GoFish' #DEFINE GOFISH_APP_FILE 'GoFish.app' - #DEFINE GOFISH_VERSION '7.1.39' - #DEFINE GOFISH_BUILDDATE 'December 27, 2024' - #DEFINE GOFISH_DBUILDDATE Date(2024,12, 27) + #DEFINE GOFISH_VERSION '7.1.40' + #DEFINE GOFISH_BUILDDATE 'January 07, 2025' + #DEFINE GOFISH_DBUILDDATE Date(2025,1, 7) #DEFINE GOFISH_DOWNLOAD_URL 'https://raw.githubusercontent.com/VFPX/GoFish/master/Source/Source.zip' - #DEFINE GOFISH_VERSION_STRING_FOR_VERSION_FILE 'GoFish - 7.1.39 - December 27, 2024 - 20241227' + #DEFINE GOFISH_VERSION_STRING_FOR_VERSION_FILE 'GoFish - 7.1.40 - January 07, 2025 - 20250107' #DEFINE THOR_TOOL_NAME 'Thor_Tool_GoFish' #DEFINE VERSON_FILE_URL 'https://github.com/VFPX/GoFish/_GoFishVersionFile.txt' #DEFINE VERSION_LOCAL_FILE 'GoFishVersionFile.txt' diff --git a/Source/BuildNumber.txt b/Source/BuildNumber.txt index 72f523f..86ee83a 100644 --- a/Source/BuildNumber.txt +++ b/Source/BuildNumber.txt @@ -1 +1 @@ -39 \ No newline at end of file +40 \ No newline at end of file diff --git a/Source/GoFish.APP b/Source/GoFish.APP index b55951c..cddb511 100644 Binary files a/Source/GoFish.APP and b/Source/GoFish.APP differ diff --git a/Source/GoFish.pjt b/Source/GoFish.pjt index ca19ba7..e726d07 100644 Binary files a/Source/GoFish.pjt and b/Source/GoFish.pjt differ diff --git a/Source/GoFish.pjx b/Source/GoFish.pjx index 04bf82f..1bd0048 100644 Binary files a/Source/GoFish.pjx and b/Source/GoFish.pjx differ diff --git a/Source/Lib/gofishsearchengine.prg b/Source/Lib/gofishsearchengine.prg index a3d381c..ef02293 100644 --- a/Source/Lib/gofishsearchengine.prg +++ b/Source/Lib/gofishsearchengine.prg @@ -3179,60 +3179,54 @@ Result *---------------------------------------------------------------------------------- - Procedure LoadOptions(tcFile) - - Local; - lcProperty As String,; - loMy As 'My' Of 'My.vcx' - - Local Array; - laProperties(1) - -*:Global; -x - - If !File(m.tcFile) + Procedure LoadOptions(tcFile, tlInit) + + Local lcProperty As String + Local loMy As 'My' Of 'My.vcx' + Local laProperties[1], lnI + + If Not File(m.tcFile) Return .F. Endif - -*-- Get an array of properties that are on the SearchOptions object + + *-- Get an array of properties that are on the SearchOptions object Amembers(laProperties, This.oSearchOptions, 0, 'U') - -*-- Load settings from file... + + *-- Load settings from file... loMy = Newobject('My', 'My.vcx') - loMy.Settings.Load(m.tcFile) - -*--- Scan over Object properties, and look for a corresponding props on the My Settings object (if present) + m.loMy.Settings.Load(m.tcFile) + + *--- Scan over Object properties, and look for a corresponding props on the My Settings object (if present) With m.loMy.Settings - For x = 1 To Alen(m.laProperties) - lcProperty = laProperties[x] - If Type('.' + m.lcProperty) <> 'U' + For lnI = 1 To Alen(m.laProperties) + lcProperty = m.laProperties[m.lnI] + If Type('.' + m.lcProperty) # 'U' Store Evaluate('.' + m.lcProperty) To ('This.oSearchOptions.' + m.lcProperty) Endif Endfor Endwith - -*-- My.Settings stores Dates as DateTimes, so I need to convert them to just Date datatypes + + *-- My.Settings stores Dates as DateTimes, so I need to convert them to just Date datatypes Try - This.oSearchOptions.dTimeStampFrom = Ttod(This.oSearchOptions.dTimeStampFrom) - Catch - This.oSearchOptions.dTimeStampFrom = {} + This.oSearchOptions.dTimeStampFrom = Ttod(This.oSearchOptions.dTimeStampFrom) + Catch + This.oSearchOptions.dTimeStampFrom = {} Endtry - + Try - This.oSearchOptions.dTimeStampTo = Ttod(This.oSearchOptions.dTimeStampTo) - Catch - This.oSearchOptions.dTimeStampTo = {} - EndTry - - If This.oSearchOptions.nSearchScope = 6 && Results + This.oSearchOptions.dTimeStampTo = Ttod(This.oSearchOptions.dTimeStampTo) + Catch + This.oSearchOptions.dTimeStampTo = {} + Endtry + + If m.tlInit and This.oSearchOptions.nSearchScope = 6 && Results This.oSearchOptions.nSearchScope = This.oSearchOptions.nPreviousSearchScope - EndIf - + Endif + Return .T. - + Endproc - + *---------------------------------------------------------------------------------- Procedure lReadyToReplace_Access diff --git a/Source/Lib/gofishui.VCT b/Source/Lib/gofishui.VCT index ad1c03f..17dfdaa 100644 Binary files a/Source/Lib/gofishui.VCT and b/Source/Lib/gofishui.VCT differ diff --git a/Source/Lib/gofishui.gf_resultsform.vc2 b/Source/Lib/gofishui.gf_resultsform.vc2 index 59ed1fb..e0074e5 100644 --- a/Source/Lib/gofishui.gf_resultsform.vc2 +++ b/Source/Lib/gofishui.gf_resultsform.vc2 @@ -197,6 +197,7 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" *m: setcaption *m: seterror *m: setpath + *m: setprocs *m: setproject *m: setscope *m: setsearchexpression @@ -1104,7 +1105,7 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" Name = "oTreeView", ; Top = 0, ; Width = 186 - *< END OBJECT: BaseClass="olecontrol" OLEObject="c:\windows\syswow64\mscomctl.ocx" Value="0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAEAAAAgAAAAEAAAD+////AAAAAAAAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/////v////7///8EAAAA/v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////1IAbwBvAHQAIABFAG4AdAByAHkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAUA//////////8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANBIQ2ZdWNsBAwAAAEACAAAAAAAAAwBPAGwAZQBPAGIAagBlAGMAdABEAGEAdABhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAgEDAAAAAgAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAagAAAAAAAAADAEEAYwBjAGUAcwBzAE8AYgBqAFMAaQB0AGUARABhAHQAYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJgACAP///////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAABcAAAAAAAAAAMAQwBoAGEAbgBnAGUAZABQAHIAbwBwAHMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAIA////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAACABAAAAAAAABAAAAAIAAAD+////BQAAAP7///8GAAAABwAAAAgAAAD+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+2kEHHiYXREbFqAMDwKDYoIUM0EggAAAA5EwAABTUAALE8wWoBAAYAIgAAABkAAAARAgAACgAAAAEAAAAB782rXAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAACQAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5MzY4MjY1RS04NUZFLTExZDEtOEJFMy0wMDAwRjg3NTREQTEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAACADgAAAEhpZGVTZWxlY3Rpb24ABQAAAEwAAAAADAAAAEluZGVudGF0aW9uABEAAABODQAAAAcAAAAAAAAAAAAFAJgVhA4GAAAAAAAAAAUAAIBw5xkAAQAAAFwAH97svQEABQC45xkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANEAKAAAATGluZVN0eWxlAAkAAABJCgAAAAEAAAANAAAATW91c2VQb2ludGVyAAkAAABJCgAAAAAAAAAOAAAAUGF0aFNlcGFyYXRvcgAKAAAASAAAAAABAAAAXAYAAABTdHlsZQAJAAAASQoAAAAGAAAADAAAAE9MRURyYWdNb2RlAAkAAABJCgAAAAAAAAAMAAAAT0xFRHJvcE1vZGUACQAAAEkKAAAAAAAAAA4AAABGdWxsUm93U2VsZWN0AAUAAABMAQAAAAoAAABTaW5nbGVTZWwABQAAAEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" /> + *< END OBJECT: BaseClass="olecontrol" OLEObject="c:\windows\syswow64\mscomctl.ocx" Value="0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAEAAAAgAAAAEAAAD+////AAAAAAAAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/////v////7///8EAAAA/v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////1IAbwBvAHQAIABFAG4AdAByAHkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAUA//////////8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAq81maYNsBAwAAAEACAAAAAAAAAwBPAGwAZQBPAGIAagBlAGMAdABEAGEAdABhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAgEDAAAAAgAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAagAAAAAAAAADAEEAYwBjAGUAcwBzAE8AYgBqAFMAaQB0AGUARABhAHQAYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJgACAP///////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAABcAAAAAAAAAAMAQwBoAGEAbgBnAGUAZABQAHIAbwBwAHMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAIA////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAACABAAAAAAAABAAAAAIAAAD+////BQAAAP7///8GAAAABwAAAAgAAAD+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+2kEHHiYXREbFqAMDwKDYoIUM0EggAAAA5EwAABTUAALE8wWoBAAYAIgAAABkAAAARAgAACgAAAAEAAAAB782rXAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAACQAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5MzY4MjY1RS04NUZFLTExZDEtOEJFMy0wMDAwRjg3NTREQTEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAACADgAAAEhpZGVTZWxlY3Rpb24ABQAAAEwAAAAADAAAAEluZGVudGF0aW9uABEAAABODQAAAAcAAAAAAAAAAAAFADAxzQAGAAAAAAAAAAUAAIBw5xkAAQAAAFwAH97svQEABQC45xkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANEAKAAAATGluZVN0eWxlAAkAAABJCgAAAAEAAAANAAAATW91c2VQb2ludGVyAAkAAABJCgAAAAAAAAAOAAAAUGF0aFNlcGFyYXRvcgAKAAAASAAAAAABAAAAXAYAAABTdHlsZQAJAAAASQoAAAAGAAAADAAAAE9MRURyYWdNb2RlAAkAAABJCgAAAAAAAAAMAAAAT0xFRHJvcE1vZGUACQAAAEkKAAAAAAAAAA4AAABGdWxsUm93U2VsZWN0AAUAAABMAQAAAAoAAABTaW5nbGVTZWwABQAAAEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" /> ADD OBJECT 'containerRight' AS container WITH ; Anchor = 15, ; @@ -2133,24 +2134,7 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" *-- Need to restore these Procedure files in case the user clears them out outside of this form. If Not Empty(m.lcApp) - lcProcedures = Upper(Set('Procedure')) - lcProc = 'GoFishSearchEngine' - If Not (Upper(m.lcProc) $ m.lcProcedures) - Try - Set Procedure To &lcProc Additive - Catch - Messagebox('Cannot restore procedure file ' + m.lcProc, 0, 'GoFish error:') - Endtry - Endif - - lcProc = 'GF_PEME_BaseTools' - If Not (Upper(m.lcProc) $ m.lcProcedures) - Try - Set Procedure To &lcProc Additive - Catch - Messagebox('Cannot restore procedure file ' + m.lcProc, 0, 'GoFish error:') - Endtry - Endif + This.SetProcs() Endif Thisform.UpdateSearchScopeVariables() @@ -2884,6 +2868,7 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" Set Filter To &lcNewFilter Goto Top + ThisForm.containerRight.Container1.lblResults.Refresh() Thisform.oGrid.SetFocus m.loTree.SetFocus() *Thisform.Refresh() @@ -2982,6 +2967,8 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" PROCEDURE Deactivate _vfp.AutoYield = Thisform.lAutoYield + This.ReleaseProcs() + Thisform.RestoreStatusBarMessage() *!* ******************** Removed 05/12/2016 ***************** @@ -3507,25 +3494,25 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" Local loSearchEngine As 'GoFishSearchEngine' Local loSearchOptions As 'GoFishSearchOptions' Local lcCustomAlias, lcFilter, lcMessage, lcScope, lcSearchExpression, lcSearchResultsAlias - Local lcSetEscape, llRegExOverride, llUpdate, lnResponse, lnReturn, lnSeconds + Local lcSetEscape, llMatched, llRegExOverride, llUpdate, lnResponse, lnReturn, lnSeconds, loProject *** JRN 2024-05-08 : special case for nSearchScope = 6, must capture results before they disappear - If Thisform.oSearchOptions.nSearchScope = 6 + If Thisform.oSearchOptions.nSearchScope = 6 And m.tlDoNotSearch = .F. lcSearchResultsAlias = This.cSearchResultsAlias If Not Used (m.lcSearchResultsAlias) Message('No results found to search') - Return + Return Endif lcCustomAlias = 'GF_ResultsScope' + Sys(2015) lcFilter = Evl(Thisform.cCurrentFilter, '1=1') - Select Distinct FilePath as FileName ; - From (m.lcSearchResultsAlias ) ; - Where &lcFilter ; + Select Distinct FilePath As FileName ; + From (m.lcSearchResultsAlias ) ; + Where &lcFilter ; Into Cursor (m.lcCustomAlias) Readwrite - If reccount(m.lcSearchResultsAlias) = 0 + If Reccount(m.lcSearchResultsAlias) = 0 Message('No results found to search') - Return + Return Endif Endif @@ -3631,23 +3618,23 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" Do Case * All open projects, if any - Case Thisform.oSearchOptions.nSearchScope = 5 + Case Thisform.oSearchOptions.nSearchScope = 5 If _vfp.Projects.Count >= 1 lnReturn = m.loSearchEngine.SearchInOpenProjects(m.lcScope, m.ttTime, m.tcUni) - Else + Else lnReturn = m.loSearchEngine.SearchProjectsInCurDir(.Null., m.ttTime, m.tcUni) - EndIf + Endif * Active project, if any - Case Thisform.oSearchOptions.nSearchScope = 1 + Case Thisform.oSearchOptions.nSearchScope = 1 If _vfp.Projects.Count >= 1 lnReturn = m.loSearchEngine.SearchInSingleProject(_vfp.ActiveProject, m.ttTime, m.tcUni) - Else + Else lnReturn = m.loSearchEngine.SearchProjectsInCurDir(.Null., m.ttTime, m.tcUni) - EndIf + Endif * Project(s) in CurDir() - Case Thisform.oSearchOptions.nSearchScope = 8 + Case Thisform.oSearchOptions.nSearchScope = 8 lnReturn = m.loSearchEngine.SearchProjectsInCurDir(.Null., m.ttTime, m.tcUni) * Current directory @@ -3666,21 +3653,21 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" * named project Case '.PJX' $ Upper(m.lcScope) llMatched = .F. - For each loProject in _vfp.Projects FoxObject - If Upper(loProject.Name) == Upper(m.lcScope) - lnReturn = m.loSearchEngine.SearchInSingleProject(loProject, m.ttTime, m.tcUni) - llMatched = .t. - EndIf - EndFor - If not m.llMatched + For Each m.loProject In _vfp.Projects FoxObject + If Upper(m.loProject.Name) == Upper(m.lcScope) + lnReturn = m.loSearchEngine.SearchInSingleProject(m.loProject, m.ttTime, m.tcUni) + llMatched = .T. + Endif + Endfor + If Not m.llMatched lnReturn = m.loSearchEngine.SearchInProject(m.lcScope, m.ttTime, m.tcUni) - EndIf + Endif * named folder - Otherwise + Otherwise lnReturn = m.loSearchEngine.SearchInPath(m.lcScope, m.ttTime, m.tcUni) - EndCase - + Endcase + If m.llRegExOverride = .T. Thisform.oSearchOptions.nSearchMode = 3 @@ -3697,11 +3684,11 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" Thisform.comboSearchScopeHistory.SaveSearchScope(m.lcScope) Else loSearchEngine.nMatchLines = Reccount(m.loSearchEngine.cSearchResultsAlias) - EndIf + Endif - If tlDoNotSearch = .F. and lnReturn >= 0 + If m.tlDoNotSearch = .F. And m.lnReturn >= 0 lnReturn = m.loSearchEngine.SearchIncludedFiles() - EndIf + Endif Thisform.nSaveTime = 0 If Not m.tlDoNotSearch And Thisform.lSaveSearchResults @@ -5582,7 +5569,7 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" lcSearchEnginerOptionsFile = Evl(m.lcFolder, This.cCR_StoreLocal) + This.cSearchOptionsXMLFile */SF 20221018 -> local storage - m.loSearchEngine.LoadOptions(m.lcSearchEnginerOptionsFile) && Load search settings from previous session + m.loSearchEngine.LoadOptions(m.lcSearchEnginerOptionsFile, .T.) && Load search settings from previous session Thisform.nOriginalSearchScope = m.loSearchOptions.nSearchScope loSearchEngine.oSearchOptions.lIncludeAllFileTypes = .F. && Deprecated feature. Set to .f. to handle old XML files loSearchEngine.oProgressBar = This.ProgressBar @@ -9599,6 +9586,24 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" Return llReturn + ENDPROC + + PROCEDURE setprocs + Local lcProc, lcProcs, lnI, loException + + lcProcs = [GoFishProc, mhHtmlCode, GoFishSearchEngine, GoFishSearchOptions, GF_PEME_BaseTools] + + For lnI = 1 To Getwordcount(m.lcProcs, [, ]) + lcProc = Getwordnum(m.lcProcs, m.lnI, [, ]) + Try + Set Procedure To &lcProc Additive + Catch To m.loException + + Endtry + Endfor + + + ENDPROC PROCEDURE setproject @@ -11527,8 +11532,8 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" ENDPROC PROCEDURE ButtonContainer.lblSearchTime.Click - Local lcFiles, lcMatchLines, lcPrompt, lcSavetime, lnADirTime, lnFilesSearched, lnPerCent - Local lnPerCent2, lnPerCent3, lnSaveTime, lnSearchTime, lnSeconds + Local laFileCount[1], lcFiles, lcMatchLines, lcPrompt, lcSavetime, lnADirTime, lnFilesSearched + Local lnPerCent, lnPerCent2, lnPerCent3, lnSaveTime, lnSearchTime, lnSeconds lnSaveTime = Thisform.nSaveTime @@ -11543,7 +11548,7 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" If m.lnSeconds = 0 Return - EndIf + Endif lnSearchTime = m.lnSeconds - m.lnADirTime - m.lnSaveTime @@ -11576,23 +11581,25 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" ENDPROC PROCEDURE ButtonContainer.lblSearchTime.Refresh - Local lcFiles, lcMatchLines, lnSeconds + Local laFileCount[1], lcMatchLines, lnFileCount, lnSeconds - lnSeconds = Thisform.oSearchEngine.nSearchTime + Thisform.nSaveTime + lnSeconds = Thisform.oSearchEngine.nSearchTime + Thisform.nSaveTime lcMatchLines = Transform(Thisform.oSearchEngine.nMatchLines) - lcFiles = Transform(Thisform.oSearchEngine.nFileCount) - If Thisform.lInit and !thisform.lSearching + Select FileName Distinct From (Thisform.cSearchResultsAlias) Into Array laFileCount + lnFileCount = _Tally + + If Thisform.lInit And Not Thisform.lSearching Text To Thisform.cSearchResultsMessage Noshow Textmerge <> line(s) - <> file(s) - in <> seconds - EndText + <> file(s) + < 0, 'in ' + Alltrim(Transform(lnSeconds, "99999.9")) + ' seconds', '')>> + Endtext Else - Thisform.cSearchResultsMessage = "" + Thisform.cSearchResultsMessage = '' Endif - This.Caption = Thisform.cSearchResultsMessage + This.Caption = Thisform.cSearchResultsMessage ENDPROC @@ -11676,7 +11683,7 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" .aRowSource[m.lnrow, 2] = 5 lnRow = m.lnRow + 1 - .aRowSource[m.lnrow, 1] = 'Project(s) in Curdir()' + .aRowSource[m.lnrow, 1] = 'Project(s) In Curdir()' .aRowSource[m.lnrow, 2] = 8 lnRow = m.lnRow + 1 @@ -12716,55 +12723,60 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" ENDPROC PROCEDURE containerRight.Container1.lblResults.Refresh - Local laFileCount[1], laRecordCount[1], lcCursor, lcFilter, lcMessage, llFiltered, lnRecords Local lnSeconds, loSearchEngine loSearchEngine = Thisform.oSearchEngine - lcCursor = Thisform.cSearchResultsAlias - lcFilter = Filter(lcCursor) - lnSeconds = thisform.oSearchEngine.nSearchTime - lcMessage = "" + lcCursor = Thisform.cSearchResultsAlias + lcFilter = Filter(m.lcCursor) + lnSeconds = Thisform.oSearchEngine.nSearchTime + lcMessage = '' - If Empty(lcFilter) - lcFilter = "1=1" - EndIf + If Empty(m.lcFilter) + lcFilter = '1=1' + Endif - lnRecords = Reccount(lcCursor) + lnRecords = Reccount(m.lcCursor) - Select Count(*) from (Select filename distinct from &lcCursor where &lcFilter order by 1) temp into array laFileCount - Select Count(*) from (Select matchline from &lcCursor where &lcFilter) temp into array laRecordCount + Select Count(*) From (Select FileName Distinct From &lcCursor Where &lcFilter Order By 1) Temp Into Array laFileCount + Select Count(*) From (Select MatchLine From &lcCursor Where &lcFilter) Temp Into Array laRecordCount - llFiltered = !Empty(Filter(lcCursor)) + llFiltered = Not Empty(Filter(m.lcCursor)) + + This.ForeColor = Rgb(128, 128, 128) Do Case - *-- If we have a filter, but it results in no results being displayed... - Case !Thisform.lInit - lcMessage = "" - - Case Thisform.oSearchEngine.nMatchLines = 0 and Thisform.oSearchEngine.lEscPress - lcMessage = "No Results" + *-- If we have a filter, but it results in no results being displayed... + Case Not Thisform.lInit + lcMessage = '' + + Case Thisform.oSearchEngine.nMatchLines = 0 And Thisform.oSearchEngine.lEscPress + lcMessage = 'No Results' Case Thisform.lSearching - lcMessage = "Searching..." + lcMessage = 'Searching...' + + Case Thisform.oSearchEngine.nMatchLines > 0 And Not Empty(Thisform.cFilter) And Eof(Thisform.cSearchResultsAlias) + lcMessage = 'No matches on specified filter.' - Case Thisform.oSearchEngine.nMatchLines > 0 and !Empty(Thisform.cFilter) and Eof(Thisform.cSearchResultsAlias) - lcMessage = "No matches on specified filter." - Case Thisform.oSearchEngine.nMatchLines = 0 - lcMessage = "No matches found." + lcMessage = 'No matches found.' - Otherwise - lcMessage = Iif(llFiltered, "Filtered to ", "") + ; - Alltrim(Str(laRecordCount)) + ; - Iif(Empty(thisform.oSearchEngine.oSearchOptions.cSearchExpression), " matches ", " match lines") + ; - " in " + Alltrim(Str(laFileCount)) + " File(s)" + Case m.laRecordCount[1] = Reccount(m.lcCursor) + lcMessage = '' + + Otherwise + lcMessage = Iif(m.llFiltered, 'Filtered to ', '') + ; + Transform(m.laRecordCount) + ' line' + Iif(m.laRecordCount # 1, 's', '') + ; + ' in ' + Trans(m.laFileCount) + ' file' + Iif(m.laFileCount # 1, 's', '') + + This.ForeColor = Thisform.nContainerFrameColour Endcase - Thisform.cResultsMessage = lcMessage + Thisform.cResultsMessage = m.lcMessage - This.Caption = lcMessage + This.Caption = m.lcMessage ENDPROC @@ -13268,7 +13280,7 @@ DEFINE CLASS gf_resultsform AS gf_baseform OF "gofishui.vcx" This.Visible = .T. Case Thisform.oSearchOptions.nSearchScope = 6 - This.Value = 'Search all files now shown in the grid or TreeView' + This.Value = 'Search all files in current results (i.e., in the grid).' This.Visible = .T. llNormalColor = .T. diff --git a/Source/Lib/gofishui.vcx b/Source/Lib/gofishui.vcx index 5591d7a..9c966dd 100644 Binary files a/Source/Lib/gofishui.vcx and b/Source/Lib/gofishui.vcx differ diff --git a/Source/Source.zip b/Source/Source.zip index 119628b..5165a7e 100644 Binary files a/Source/Source.zip and b/Source/Source.zip differ diff --git a/_GoFishVersionFile.txt b/_GoFishVersionFile.txt index 162ebdc..2c23003 100644 --- a/_GoFishVersionFile.txt +++ b/_GoFishVersionFile.txt @@ -9,6 +9,17 @@ Text to lcNote NoShow --- +## Version 7.1.40 - 2025-01-07 + +Bug fix: +- Problem with "class not found" error, caused by problems with "Set Procedure" adventures (#324) + +Minor UI changes: +- When loading history + - Restores Scope setting 'Files in current Results' + - Restores count of matches (upper right corner) and files with matches +- Correctly updates count of matches and files with matches when filtering the grid. + ## Version 7.1.39 - 2024-12-27 Extended definitions for project-related Scope settings when no projects satisfy the Scope criterion: @@ -183,27 +194,14 @@ New options on "New in V7" page of Options screen: - Matches for search expressions ending with backslash, such as `C:\`, not being found (#264) - Two additions to grid context menu: - DeleteMark - - Set Deleted -- Selecting "Browse Project" or "Browse Directory" sets scope to last project/directory (instead of blank) - -## Version 7.1.13 - 2024-06-29 - -- Matches to currency symbol(s) not being found (#261) - -## Version 7.1.12 - 2024-06-29 - -- New option to select the font size used in comboboxes (search expression, scope, mode, etc) (#259) - -## Version 7.1.11 - 2024-06-18 - -- New option to display th + - Se EndText * For GF, strip off links at top of change log lcNote = Substr(lcNote, At('--', lcNote)) lcNote = Alltrim(lcNote, 1, ' ', '-', Chr(13), Chr(10)) -AddProperty(toUpdateInfo, 'AvailableVersion', 'GoFish - 7.1.39 - December 27, 2024 - 20241227') +AddProperty(toUpdateInfo, 'AvailableVersion', 'GoFish - 7.1.40 - January 07, 2025 - 20250107') AddProperty(toUpdateInfo, 'SourceFileUrl', 'https://raw.githubusercontent.com/VFPX/GoFish/master/Source/Source.zip') AddProperty(toUpdateInfo, 'LinkPrompt', 'GoFish Home Page') AddProperty(toUpdateInfo, 'Link', 'https://github.com/VFPX/GoFish') diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index 0976bb8..c0c350a 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -6,6 +6,17 @@ --- +## Version 7.1.40 - 2025-01-07 + +Bug fix: +- Problem with "class not found" error, caused by problems with "Set Procedure" adventures (#324) + +Minor UI changes: +- When loading history + - Restores Scope setting 'Files in current Results' + - Restores count of matches (upper right corner) and files with matches +- Correctly updates count of matches and files with matches when filtering the grid. + ## Version 7.1.39 - 2024-12-27 Extended definitions for project-related Scope settings when no projects satisfy the Scope criterion: