Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002507 [JEDI VCL] 00 JVCL Components minor always 2005-01-15 14:02 2005-01-17 13:08
Reporter Simes View Status public  
Assigned To remkobonte
Priority normal Resolution fixed  
Status resolved   Product Version 3.00 BETA 2
Summary 0002507: TJvFindReplace infinite loop when closing form
Description Run 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 Information unit 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.

Tags No tags attached.
Attached Files

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

-  Notes
(0006158)
Simes (reporter)
2005-01-16 13:05

See 2515 - it has a modified version of this component.
(0006190)
remkobonte (developer)
2005-01-17 13:08

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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker