View Issue Details

IDProjectCategoryView StatusLast Update
0004150JEDI VCL00 JVCL Componentspublic2007-06-19 02:43
ReporteradrianonantuaAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.31 
Target VersionFixed in Version3.34 
Summary0004150: TJvDBSpinEdit improperly firing database actions
DescriptionIf you place a JvDBSpinEdit in a form and you have database actions on this form, when this component receive focus, it fires the first database action (in my case, the DataSetInsert action). Actually, I already know what's wrong and corrected it in my environment: the UpdateAction function calls the fDataLink EXECUTEACTION, which happens differently for other Jv DB Controls. In these controls, you have the ExecuteAction calling the fDatalink.ExecuteAction and UpdateAction calling fDatalink.UpdateAction. But in the JvDBSpinEdit, the ExecuteAction calls fDatalink.ExecuteAction and so does the UpdateAction (instead of calling its correspondent function fDataLink.UpdateAction).
TagsNo tags attached.

Activities

adrianonantua

2007-06-13 07:24

reporter   ~0013301

CODE WITH BUG
=============
function TJvDBSpinEdit.ExecuteAction(Action: TBasicAction): Boolean;
begin
  Result := inherited ExecuteAction(Action) or
    (Assigned(FDataLink) and FDataLink.ExecuteAction(Action));
end;

...

function TJvDBSpinEdit.UpdateAction(Action: TBasicAction): Boolean;
begin
  Result := inherited UpdateAction(Action) or
    (Assigned(FDataLink) and FDataLink.ExecuteAction(Action));
end;

CODE CORRECTED IN MY ENVIRONMENT
================================
function TJvDBSpinEdit.ExecuteAction(Action: TBasicAction): Boolean;
begin
  Result := inherited ExecuteAction(Action) or
    (Assigned(FDataLink) and FDataLink.ExecuteAction(Action));
end;
...
function TJvDBSpinEdit.UpdateAction(Action: TBasicAction): Boolean;
begin
  Result := inherited UpdateAction(Action) or
    (Assigned(FDataLink) and FDataLink.UpdateAction(Action));
end;

obones

2007-06-19 02:42

administrator   ~0013392

This is now in SVN

Issue History

Date Modified Username Field Change
2007-06-13 07:11 adrianonantua New Issue
2007-06-13 07:24 adrianonantua Note Added: 0013301
2007-06-19 02:42 obones Status new => resolved
2007-06-19 02:42 obones Fixed in Version => Daily / SVN
2007-06-19 02:42 obones Resolution open => fixed
2007-06-19 02:42 obones Assigned To => obones
2007-06-19 02:42 obones Note Added: 0013392