View Issue Details

IDProjectCategoryView StatusLast Update
0002862JEDI VCL00 JVCL Componentspublic2005-08-09 07:11
ReporteranonymousAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionopen 
Product Version3.00 
Target VersionFixed in Version 
Summary0002862: JvInspector's OnItemEdit Event DOESNOT work correctly!
DescriptionI create Inspector's Item as felow:

    NewItem := TJvInspectorVarData.New(JvInspector.Root, 'FileName',
      TypeInfo(string), @(Data.Filename));
    NewItem.DisplayName := '楼层文件';
      NewItem.Flags := NewItem.Flags + [iifEditButton];

Then, I write OnItemEdit event of JvInspector:

procedure TfmMain.JvInspectorItemEdit(Sender: TJvCustomInspector;
  Item: TJvCustomInspectorItem; var DisplayStr: String);
begin
  if (Item.Name = 'FileName') then
  begin
    if OpenPictureDialog.Execute then
    begin
      DisplayStr := ExtractFileName(OpenPictureDialog.FileName);
    end;
  end;
end;
TagsNo tags attached.

Activities

obones

2005-04-12 01:57

administrator   ~0006911

And?
What happens, what does not happen?
If you put a breakpoint on the very first line of the OnItemEdit, does it stop on it?

anonymous

2005-04-12 19:39

viewer   ~0006986

And The OpenPictureDialog is Showing but It CANNOT change the Value of Data.FileName. I have tracked it, But I Cannot find where it is wrong!

chensielcx

2005-04-18 02:21

reporter   ~0007020

I Have changed TJvCustomInspectorItem.Edit as follow, It can also ACTIVE
TJvInspector's OnItemValueChanged, ... Events. But I don't know WHY Original
Source active incorrectly!

procedure TJvCustomInspectorItem.Edit;
var
  DisplayStr: string;
begin
  if Assigned(FInspector) then
    if Assigned(FInspector.FOnItemEdit) then
    begin
      if Assigned(FEditCtrl) then
        DisplayStr := FEditCtrl.Text
      else
        DisplayStr := FData.AsString;
      FInspector.FOnItemEdit(FInspector, Self, DisplayStr);
      if DisplayStr <> FEditCtrl.Text then
      begin
        FEditCtrl.Text := DisplayStr;
        FEditCtrl.SelectAll;
      end;
    end;
end;

obones

2005-04-18 07:06

administrator   ~0007024

Still, I don't understand what's wrong and why you want this changed.

obones

2005-08-09 07:11

administrator   ~0007730

No answers, closing the issue.

Issue History

Date Modified Username Field Change
2005-04-11 19:19 anonymous New Issue
2005-04-12 01:57 obones Note Added: 0006911
2005-04-12 01:57 obones Status new => feedback
2005-04-12 19:39 anonymous Note Added: 0006986
2005-04-18 02:21 chensielcx Note Added: 0007020
2005-04-18 07:06 obones Note Added: 0007024
2005-08-09 07:11 obones Status feedback => closed
2005-08-09 07:11 obones Note Added: 0007730