View Issue Details

IDProjectCategoryView StatusLast Update
0002507JEDI VCL00 JVCL Componentspublic2005-01-17 13:08
ReporterSimesAssigned Toremkobonte 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 BETA 2 
Target VersionFixed in Version3.00 
Summary0002507: TJvFindReplace infinite loop when closing form
DescriptionRun the code below, then close the form. Code enters an infinite loop.

Can be fixed by adding indicated lines:

procedure TJvFindReplace.SetEditControl(Value: TCustomEdit);
begin
  if FEditControl <> nil then //<-----
    FEditControl.RemoveFreeNotification(Self); //<-----
  FEditControl := Value;
  if Value <> nil then
    Value.FreeNotification(Self);
end;

Additional Informationunit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, JvComponent, JvFindReplace, ComCtrls;

type
  TForm1 = class(TForm)
    JvFindReplace1: TJvFindReplace;
    PageControl1: TPageControl;
    procedure FormCreate(Sender: TObject);
  private
  public
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
  procedure NewMemo;
  var
    memo: TMemo;
    TabSheet: TTabSheet;
  begin
    TabSheet := TTabSheet.Create(self);
    TabSheet.PageControl := PageControl1;
    PageControl1.ActivePage := TabSheet;
    memo := TMemo.Create(TabSheet); // <- memo is owned by the tab sheet
                                    //not the form - unusual, but not
                                    //disallowed!
    with memo do begin
      Parent := TabSheet;
      Align := alClient;
      Text := 'qaz qaz qaz';
    end;
    JvFindReplace1.EditControl := memo;
  end;
begin
  NewMemo;
  NewMemo;
end;

end.

TagsNo tags attached.

Relationships

related to 0002515 resolvedobones Modified TJvFindReplace source to correct issues 2503, 2504, 2513 

Activities

Simes

2005-01-16 13:05

reporter   ~0006158

See 2515 - it has a modified version of this component.

remkobonte

2005-01-17 13:08

developer   ~0006190

Problem was that inherited Notification was not called in the Notification method.

Fixed in rev. 1.26

Issue History

Date Modified Username Field Change
2005-01-15 14:02 Simes New Issue
2005-01-16 13:05 Simes Note Added: 0006158
2005-01-17 03:15 obones Relationship added related to 0002515
2005-01-17 13:08 remkobonte Status new => resolved
2005-01-17 13:08 remkobonte Resolution open => fixed
2005-01-17 13:08 remkobonte Assigned To => remkobonte
2005-01-17 13:08 remkobonte Note Added: 0006190