Find/replace hard and soft errors in Rich Edit Demo

Moderator: Rathinagiri

Post Reply
User avatar
kcarmody
Posts: 152
Joined: Tue Oct 07, 2014 11:13 am
Contact:

Find/replace hard and soft errors in Rich Edit Demo

Post 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
Last edited by kcarmody on Sat Nov 07, 2015 6:27 pm, edited 1 time in total.
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

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

Post by srvet_claudio »

Thanks for report, I will check.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
kcarmody
Posts: 152
Joined: Tue Oct 07, 2014 11:13 am
Contact:

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

Post by kcarmody »

srvet_claudio wrote:Thanks for report, I will check.
Thank you, Claudio.

Kevin
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

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

Post by srvet_claudio »

I fixed.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
serge_girard
Posts: 3167
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

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

Post by serge_girard »

Thanks Claudio !

Serge
There's nothing you can do that can't be done...
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

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

Post by esgici »

srvet_claudio wrote:I fixed.
Thanks Claudio :D

Viva HMG :D
Viva INTERNATIONAL HMG :D
User avatar
kcarmody
Posts: 152
Joined: Tue Oct 07, 2014 11:13 am
Contact:

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

Post by kcarmody »

srvet_claudio wrote:I fixed.
Thank you Claudio. Where can we download the fix?
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

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

Post 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)
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
Post Reply