OnChange Issue

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
DavidRM
Posts: 91
Joined: Mon Aug 29, 2005 5:18 pm
Location: Tulsa, OK
Contact:

OnChange Issue

Post by DavidRM »

I'm having a situation where an empty SRVE is triggering the internal TRVE's OnChange event when it's doing an initial repaint. I repeat: It's an empty SRVE. Nothing has been loaded. But the initial repaint event sets the internal TRVE's pageheight or something like that and suddenly we have an OnChange event.

That makes it very hard to accurately track whether there as *really* been any changes or not.

And if you could also make it so that calling SRVE's Format procedure doesn't trigger an OnChange event, I'd be ecstatic.

Thanks.

-David
proxy3d
ScaleRichView Developer
Posts: 307
Joined: Mon Aug 07, 2006 9:37 am

Post by proxy3d »

How to me to reproduce call OnChange for empty SRV? If I put on form SRV and I start the application at me call OnChange does not occur. If in ActionTest I press to create the new document creates OnChange (the document changes, therefore it is caused).
Make changes to a code:

Code: Select all

procedure TSRichViewEdit.HookOnChange(Sender: TObject);
.....
  if FCanRefreshData then begin
    if Assigned(FStoredOnChange) then
      FStoredOnChange(Sender);

    if Assigned(FOnChange) then
      FOnChange(Self);
  end;
DavidRM
Posts: 91
Joined: Mon Aug 29, 2005 5:18 pm
Location: Tulsa, OK
Contact:

Post by DavidRM »

I'll try to narrow things down more today.

Thanks for the code fix.

-David
Post Reply