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
0003004 [JEDI VCL] 00 JVCL Components minor always 2005-05-30 06:22 2005-06-01 06:07
Reporter mholmes View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.00
Summary 0003004: ProgressPosition is not updated by ProgressStepIt in JVProgressComponent
Description I'm working with JVProgressComponent, and I have some code to update it like this:

procedure TfrmMain.Timer1Timer(Sender: TObject);
begin
  with dlgJVProgComp do
    begin
      if Cancel or (ProgressPosition >= ProgressMax) then
        begin
          Timer1.Enabled := False;
          Hide;
          Exit;
        end;
      ProgressStepIt;
    end;
end;

However, the condition (ProgressPosition >= ProgressMax) is never satisfied; when the progress reaches its end, it just starts again. Debugging shows that while the component is updated visually by ProgressStepIt, the value of ProgressPosition never changes from 0.
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0007376)
obones (administrator)
2005-06-01 05:57

This is confirmed in D7
(0007377)
obones (administrator)
2005-06-01 06:07

This is now in CVS.
To fix it in your copy, go into the ProgressStepIt function in JvProgressComponent.pas and replace "FProgressBar.StepIt" by the code below:

    Inc(FProgressPosition, ProgressStep);
    if ProgressPosition > ProgressMax then
      FProgressPosition := ProgressMax
    else if ProgressPosition < ProgressMin then
      FProgressPosition := ProgressMin
    else
      FProgressBar.StepIt;

Cheers
Olivier

- Issue History
Date Modified Username Field Change
2005-05-30 06:22 mholmes New Issue
2005-06-01 05:57 obones Note Added: 0007376
2005-06-01 05:57 obones Status new => confirmed
2005-06-01 06:07 obones Status confirmed => resolved
2005-06-01 06:07 obones Resolution open => fixed
2005-06-01 06:07 obones Assigned To => obones
2005-06-01 06:07 obones Note Added: 0007377


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