View Issue Details

IDProjectCategoryView StatusLast Update
0003214JEDI VCL00 JVCL Componentspublic2005-11-22 04:45
ReportermarcgeldonAssigned ToAHUser 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.10 
Summary0003214: Different TJvDBTreeView bugs (with bugfix)
DescriptionHello!

I've found different bugs in the TJvDBTreeView component. I will provide an demo application and a bug-fixed version of the current JvDBTreeView.pas.

So here are the bugs:
- there is a worse bug in the procedure DeleteNode. Here is how you can produce it: mark a treenode and delete it, the selection (in the treeview) jumps to the next treenode. BUT ONLY THE SELECTION, not the dataset! So if you would press CTRL+DEL again, you delete the right treenode in the treeview, but you delete the wrong data row.

- if you call procedure "Change2" with nil, you'll get a bad exception.

- function "CanEdit" ignored the "ReadOnly" property from the treeview.

- it was possible to drag'n'drop treenodes, also if "ReadOnly" was true.

- If someone edit the dataset and changed the value from the JvDBTreeView DetailField to NULL (which is the StartMasterValue), then the Destination Treenode is nil (this is correct), but in the procedure "TJvDBTreeNode.MoveTo" we try to access the destination treenode. So we also get a bad exception message here. (You'll only get the exception if the children you'll edit in the dataset is also visible in the DBTreeview).

All these bugs are fixed now. Try these things with the version from today (2005-09-22) from the CVS. And then try my new version.

The component seems to be very stable after all that fixes. But it still has one big problem: you should not edit the data in the dataset directly. The treeview does not work with all changes.

Hope to hear from you soon.


Best wishes from Germany,

Marc Geldon
(PRO IT SYSTEMS)
Additional InformationThis bug is related to bug no. 0002733 and 0002725. So if you close this bug, don't forget these ones.
TagsNo tags attached.

Relationships

child of 0002733 closed JvDBTreeView - ReadOnly does not work on Drag'n'Drop 
child of 0002725 closed JvDBTreeVIew - Bug in procedure DeleteNode 

Activities

2005-09-22 05:42

 

DBTreeview Test and bugfixed version.zip (12,473 bytes)

2005-09-22 05:43

 

JvDBTreeView (bugfixed version).pas (40,240 bytes)

marcgeldon

2005-09-22 05:48

reporter   ~0007958

+++ TIP FOR JVDBTREEVIEW USERS +++
If you edit the data in the dataset directly, not all changes do work (JvDBTreeView will not show them correctly). The best thing to refresh the JvDBTreeView is to disconnect and reconnect the DataSource. This is the way I'll do it, if I have heavy changes in the dataset directly:

  JvDBTreeView.DataSource := nil;
  JvDBTreeView.DataSource := DataSource1;

marcgeldon

2005-11-16 02:09

reporter   ~0008088

Can somebody check this and add it to CVS? There is a fix for this bug! Not much work to do.

AHUser

2005-11-22 04:45

developer   ~0008113

Added to CVS.

Issue History

Date Modified Username Field Change
2005-09-22 05:42 marcgeldon New Issue
2005-09-22 05:42 marcgeldon File Added: DBTreeview Test and bugfixed version.zip
2005-09-22 05:43 marcgeldon File Added: JvDBTreeView (bugfixed version).pas
2005-09-22 05:48 marcgeldon Note Added: 0007958
2005-11-16 02:09 marcgeldon Note Added: 0008088
2005-11-22 04:45 AHUser Status new => resolved
2005-11-22 04:45 AHUser Resolution open => fixed
2005-11-22 04:45 AHUser Assigned To => AHUser
2005-11-22 04:45 AHUser Note Added: 0008113
2005-11-22 09:17 obones Relationship added child of 0002733
2005-11-22 09:18 obones Relationship added child of 0002725