Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004150 [JEDI VCL] 00 JVCL Components major always 2007-06-13 07:11 2007-06-19 02:43
Reporter adrianonantua View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.31
Summary 0004150: TJvDBSpinEdit improperly firing database actions
Description If 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).
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0013301)
adrianonantua (reporter)
2007-06-13 07:24

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;
(0013392)
obones (administrator)
2007-06-19 02:42

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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker