Page 1 of 1

Find/replace hard and soft errors in Rich Edit Demo

Posted: Sat Nov 07, 2015 2:34 pm
by kcarmody
The Find and Replace features in the current Rich Edit Demo are broken. (They are also broken in the revised Rich Edit Demo that I submitted last month. Since they are broken in the current demo, which I did not modify, these are not my errors.)

In the Rich Edit Demo, if you click on either Find or Replace (the two binocular buttons in the upper right corner) and search for text that is in the current document, it crashes with the following traceback:
Error BASE/1132 Bound error: array access
Called from GETFORMTYPEBYINDEX(427)
Called from _SETWINDOWSIZEPOS(5138)
Called from MOVEDIALOG(478)
Called from FINDREPLACEONCLICKPROC(462)
Called from (b)EVAL(166)
Called from EVENTS(511)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5696)
Called from MAIN(394)
This must be the first find or replace that you do, and it must be for text that is actually in the document. If you search for text that is not in the current document, then it correctly reports that the text is not found. However, if you then do a second search, for text that is in the document, it does not crash, but it does incorrectly report that the text is not found.

These bugs were in version 3.4.1 but not 3.3.1. I don't have any versions in between.

One of the lines in the traceback is in _SetWindowSizePos(), line 5138 in h_windows.prg, which is:
IF GetFormTypeByIndex ( nIndex ) == "P" // Panel Window, ADD (May 2015)
This line says it was modified this past May, and this part of _SetWindowSizePos() was modified between 3.3.1 and 3.4.1.

TIA to anyone that can help :)

Kevin

Re: Find/replace hard and soft errors in Rich Edit Demo

Posted: Sat Nov 07, 2015 4:53 pm
by srvet_claudio
Thanks for report, I will check.

Re: Find/replace hard and soft errors in Rich Edit Demo

Posted: Mon Nov 09, 2015 2:30 pm
by kcarmody
srvet_claudio wrote:Thanks for report, I will check.
Thank you, Claudio.

Kevin

Re: Find/replace hard and soft errors in Rich Edit Demo

Posted: Sat Jan 16, 2016 2:00 pm
by srvet_claudio
I fixed.

Re: Find/replace hard and soft errors in Rich Edit Demo

Posted: Sat Jan 16, 2016 2:04 pm
by serge_girard
Thanks Claudio !

Serge

Re: Find/replace hard and soft errors in Rich Edit Demo

Posted: Sat Jan 16, 2016 2:27 pm
by esgici
srvet_claudio wrote:I fixed.
Thanks Claudio :D

Viva HMG :D

Re: Find/replace hard and soft errors in Rich Edit Demo

Posted: Thu Jan 21, 2016 10:18 am
by kcarmody
srvet_claudio wrote:I fixed.
Thank you Claudio. Where can we download the fix?

Re: Find/replace hard and soft errors in Rich Edit Demo

Posted: Thu Jan 28, 2016 3:45 pm
by srvet_claudio
kcarmody wrote:
srvet_claudio wrote:I fixed.
Thank you Claudio. Where can we download the fix?
Hi Kevin,

please replace in function _SetWindowSizePos (h_windows.prg, line 5141) the original IF for this:

Code: Select all

IF nIndex > 0 .AND. GetFormTypeByIndex ( nIndex ) == "P"   // Panel Window,   ADD (May 2015, Fixed January 2016)