View Issue Details

IDProjectCategoryView StatusLast Update
0002524JEDI VCL00 JVCL Componentspublic2005-01-22 06:02
ReporterSimesAssigned ToAHUser 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 BETA 2 
Target VersionFixed in Version3.00 
Summary0002524: TJvEditor doesn't invoke OnChange when Lines.Text changed or Lines assigned
DescriptionSetting the value of Lines.Text, or assigning Lines doesn't invoke the OnChange event.

Run the code below. Click button 1 or 2, OnChange event doesn't happen.

(Similar problem to already fixed 2216)
Additional Informationunit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, JvExControls, JvComponent, JvEditorCommon, JvEditor;

type
  TForm1 = class(TForm)
    JvEditor1: TJvEditor;
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure JvEditor1Change(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
  public
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  JvEditor1.Lines.Text := 'Some text';
end;

procedure TForm1.Button2Click(Sender: TObject);
var
  sl: TStringList;
begin
  sl := TStringList.Create;
  try
    sl.Add('Some strings');
    sl.Add('Some more strings');
    JvEditor1.Lines.Assign(sl);
  finally
    sl.Free;
  end;
end;

procedure TForm1.JvEditor1Change(Sender: TObject);
begin
  Caption := 'Changed'; // never happens
end;

end.

TagsNo tags attached.

Activities

Simes

2005-01-17 15:30

reporter   ~0006195

Suggest TJvCustomEditor.DoLinesChange calls TJvCustomEditorBase.Changed instead of setting Modified property directly.

AHUser

2005-01-22 06:02

developer   ~0006248

Fixed in CVS.

- Moved DoLineChanged to JvEditorCommon
- Changed DoLineChanged to call "Changed;"
- Added assignment code of DoLineChanged to JvUnicodeEditor

Issue History

Date Modified Username Field Change
2005-01-17 15:12 Simes New Issue
2005-01-17 15:30 Simes Note Added: 0006195
2005-01-22 06:02 AHUser Status new => resolved
2005-01-22 06:02 AHUser Resolution open => fixed
2005-01-22 06:02 AHUser Assigned To => AHUser
2005-01-22 06:02 AHUser Note Added: 0006248