Find/replace hard and soft errors in Rich Edit Demo

Moderator: Rathinagiri

Post Reply
User avatar
kcarmody
Posts: 122
Joined: Tue Oct 07, 2014 11:13 am
Has thanked: 6 times
Been thanked: 16 times
Contact:

Find/replace hard and soft errors in Rich Edit Demo

Post by kcarmody » Sat Nov 07, 2015 2:34 pm

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: 2044
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 35 times
Been thanked: 146 times
Contact:

Post by srvet_claudio » Sat Nov 07, 2015 4:53 pm

Thanks for report, I will check.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
kcarmody
Posts: 122
Joined: Tue Oct 07, 2014 11:13 am
Has thanked: 6 times
Been thanked: 16 times
Contact:

Post by kcarmody » Mon Nov 09, 2015 2:30 pm

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

Kevin

User avatar
srvet_claudio
Posts: 2044
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 35 times
Been thanked: 146 times
Contact:

Post by srvet_claudio » Sat Jan 16, 2016 2:00 pm

I fixed.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
serge_girard
Posts: 2348
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 590 times
Been thanked: 124 times
Contact:

Post by serge_girard » Sat Jan 16, 2016 2:04 pm

Thanks Claudio !

Serge

User avatar
esgici
Posts: 4516
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 389 times
Been thanked: 111 times
Contact:

Post by esgici » Sat Jan 16, 2016 2:27 pm

srvet_claudio wrote:I fixed.
Thanks Claudio :D

Viva HMG :D
Viva INTERNATIONAL HMG :D

User avatar
kcarmody
Posts: 122
Joined: Tue Oct 07, 2014 11:13 am
Has thanked: 6 times
Been thanked: 16 times
Contact:

Post by kcarmody » Thu Jan 21, 2016 10:18 am

srvet_claudio wrote:I fixed.
Thank you Claudio. Where can we download the fix?

User avatar
srvet_claudio
Posts: 2044
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 35 times
Been thanked: 146 times
Contact:

Post by srvet_claudio » Thu Jan 28, 2016 3:45 pm

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