General TRichView support forum. Please post your questions here
cjb
Posts: 12 Joined: Wed Jun 08, 2016 8:47 am
Post
by cjb » Wed Jun 08, 2016 10:42 am
Hi,
I've been using TRichViewEdit and noticed a possible inconsistency with how the OnChanging event is not triggered before Redo/Undo operations. I noticed this when tracking down some inconsistent behaviour in my app. It seems to me that the event should be triggered.
So would it be sensible to change the code implementation as follows?
Code: Select all
procedure TCustomRichViewEdit.Redo;
begin
...
DoChanging; // Add this call here?
TRVEditRVData(RVData).RedoList.Redo(RVData);
DoChange(False);
end
else
RVData.Beep;
end;
procedure TCustomRichViewEdit.Undo;
begin
...
DoChanging; // Add this call here?
TRVEditRVData(RVData).UndoList.Undo(RVData);
DoChange(False);
end
else
RVData.Beep;
end;
I look forward to your thoughts - thanks.
cjb
Posts: 12 Joined: Wed Jun 08, 2016 8:47 am
Post
by cjb » Mon Jun 13, 2016 1:10 pm
Any thoughts on this please as I would like to avoid having to make local changes to the TRichViewEdit source code if possible...
Thanks!
Sergey Tkachenko
Site Admin
Posts: 17557 Joined: Sat Aug 27, 2005 10:28 am
Contact:
Post
by Sergey Tkachenko » Mon Jun 13, 2016 1:21 pm
I need to think about it, but it looks like this change is correct, and should be included in the components.
cjb
Posts: 12 Joined: Wed Jun 08, 2016 8:47 am
Post
by cjb » Thu Jul 14, 2016 2:18 pm
Many thanks much appreciated!