View Issue Details

IDProjectCategoryView StatusLast Update
0002295JEDI VCL00 JVCL Componentspublic2004-12-11 06:25
ReporterMoskwaAssigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 BETA 
Target VersionFixed in Version3.00 RC 1 
Summary0002295: TJvCustomDBTreeView and Insert new record when DataSet is empty
DescriptionTJvCustomDBTreeView has an error (access violation) when You try to add new record when DataSet is empty. Because Selected is nil and there is exception on Selected.Parent in line AddChildNode(Selected.Parent, True).EditText
Additional InformationChange for example in KeyDown procedure :
VK_INSERT:
      if not IsEditing then
      begin
        Sel := Selected;
        if [ssAlt] = Shift then
          //AddChild
          AddChildNode(Selected, True).EditText
        else begin
          //Add
          if Selected<>nil then //this prevent access
                                //violation on Insert first
                                //child when DS is empty
            AddChildNode(Selected.Parent, True).EditText
          else AddChildNode(nil, True).EditText;
        end;
      end;

it will add first item at Root.

TagsNo tags attached.

Activities

user72

2004-11-08 05:19

  ~0005589

This has already been fixed, AFAICS:

    VK_INSERT:
      if not IsEditing then
      begin
        Sel := Selected;
        if not Assigned(Selected) or ([ssAlt] = Shift) then
          //AddChild
          AddChildNode(Selected, True).EditText
        else
          //Add
          AddChildNode(Selected.Parent, True).EditText;
      end;

The latest CVS file carries this version ID tag:
// $Id: JvDBTreeView.pas,v 1.33 2004/09/01 15:06:36 ahuser Exp $

obones

2004-11-30 04:33

administrator   ~0005773

Please try with the latest zip files and tell us if the problem is fixed. These files are available here:

http://jvcl.sf.net/daily/
http://jcl.sf.net/daily/

If we don't hear from you in the next 7 days, we will consider this issue fixed.

user72

2004-12-11 06:25

  ~0005867

No reply, so assuming it works

Issue History

Date Modified Username Field Change
2004-11-06 06:26 Moskwa New Issue
2004-11-08 05:19 user72 Note Added: 0005589
2004-11-08 05:19 user72 Status new => feedback
2004-11-30 04:33 obones Note Added: 0005773
2004-12-11 06:25 user72 Status feedback => resolved
2004-12-11 06:25 user72 Resolution open => fixed
2004-12-11 06:25 user72 Assigned To => user72
2004-12-11 06:25 user72 Note Added: 0005867
2004-12-11 06:25 user72 Assigned To user72 =>