View Issue Details

IDProjectCategoryView StatusLast Update
0003810JEDI VCL00 JVCL Componentspublic2006-07-17 01:24
ReporterNanotonneAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionwon't fix 
Product Version 
Target VersionFixed in Version 
Summary0003810: JvAppIniFileStorage : OnGetFileName event is called 3x if Location=flCustom : probably a bug
Descriptioni have tested with new application OnGetFileName event with Location=flCustom; Filename=''; Autoflush=Autoreload=false; flushondestroy=true :
OnGetFileName event is called 3x when app start ! it's normal?

i think OnGetFileName event should be called only 1x when app start!, not 3x!

my OnGetFileName event :
procedure TForm1.JvAppIniFileStorage1GetFileName(
  Sender: TJvCustomAppStorage; var FileName: TFileName);
begin
  memo1.Lines.Append(datetimetostr(now)+ ' : '+
  'Sender: TJvCustomAppStorage='+Sender.Name+
  '; var FileName: TFileName='+FileName);
end;
Additional Information
i have only add tmemo(=memo1) and TJvAppIniFileStorage(=JvAppIniFileStorage1) on tform (=form1)

see code :

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, JvComponentBase, JvAppStorage, JvAppIniStorage;

type
  TForm1 = class(TForm)
    JvAppIniFileStorage1: TJvAppIniFileStorage;
    Memo1: TMemo;
    procedure JvAppIniFileStorage1GetFileName(Sender: TJvCustomAppStorage;
      var FileName: TFileName);
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.JvAppIniFileStorage1GetFileName(
  Sender: TJvCustomAppStorage; var FileName: TFileName);
begin
  memo1.Lines.Append(datetimetostr(now)+ ' : '+
  'Sender: TJvCustomAppStorage='+Sender.Name+
  '; var FileName: TFileName='+FileName);
end;

end.
TagsNo tags attached.

Activities

Nanotonne

2006-07-13 08:24

reporter   ~0009798

(tested with daily jcl/jvcl ! )

obones

2006-07-17 01:24

administrator   ~0009806

OnGetFileName is called whenever it is required to be called, we won't take any steps to change this as it would imply caching the file name. And if a user wants to change it in the middle of the life of his application, he must be able to do so.

Issue History

Date Modified Username Field Change
2006-07-13 08:17 Nanotonne New Issue
2006-07-13 08:24 Nanotonne Note Added: 0009798
2006-07-17 01:24 obones Status new => resolved
2006-07-17 01:24 obones Resolution open => won't fix
2006-07-17 01:24 obones Assigned To => obones
2006-07-17 01:24 obones Note Added: 0009806