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
0006673 [JEDI VCL] 00 JVCL Components minor always 2019-04-24 08:22 2019-04-25 20:09
Reporter vtrhe View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version Daily / GIT
Summary 0006673: Assigning empty TStrings to TJvSpinEdit.Items raises SListIndexError
Description Create an empty TStringList and assign it to TJvSpinEdit.Items. This raises a SListIndexError exception.
Additional Information procedure TForm1.Button1Click(Sender: TObject);
var
  MyStringList: TStringList;
begin
  MyStringList := TStringList.Create;
  try
    JvSpinEdit1.Items := MyStringList; //<-- raises Exception
  finally
    MyStringList.Free;
  end;
end;


  Possible Solution:
  Unit JvSpin.pas

 ...

  procedure TJvCustomSpinEdit.SetItems(const AValue: TStrings);
  begin
    FItems.Assign(AValue);
    Value := 0;
    if FItems.Count = 0 then // <-- Check for Num of Strings
      Text := ''
    else
      Text := FItems[0];
  end;

 ...

Tags No tags attached.
Attached Files zip file icon JvSpinEdit_Bug.zip [^] (53,595 bytes) 2019-04-24 08:29

- Relationships

-  Notes
(0021733)
mh (reporter)
2019-04-25 20:01

Pull request with your fix created:
https://github.com/project-jedi/jvcl/pull/88 [^]

- Issue History
Date Modified Username Field Change
2019-04-24 08:22 vtrhe New Issue
2019-04-24 08:29 vtrhe File Added: JvSpinEdit_Bug.zip
2019-04-25 20:01 mh Note Added: 0021733
2019-04-25 20:09 obones Status new => resolved
2019-04-25 20:09 obones Fixed in Version => Daily / GIT
2019-04-25 20:09 obones Resolution open => fixed
2019-04-25 20:09 obones Assigned To => obones


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