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
0006412 [JEDI VCL] 00 JVCL Components minor always 2015-06-05 02:22 2015-09-21 17:47
Reporter sambo View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version Daily / GIT
Summary 0006412: TJvSpinEdit bound exception when using vtString
Description Hello,

I'm using the new feature you added for us into the spin edits whereby you can load TStrings and set the ValueType to vtString. Thanks for that!

I did notice a couple easy to reproduce (and seemingly easy to fix) issues:
(In both cases, I'm referring speficially to cases when vtString is in use.)

1) When clicking Up/Down, the value isn't checked against either MaxValue/MinValue nor the item count of the Items field.

2) Setting a MaxValue and loading a shorter list of Items doesn't do anything for the MaxValue.
Additional Information I've included a trivial sample project. (I happen to build on XE8, so the project file may or may not load in previous versions of Delphi RAD Studio, but a new project file can be trivially created.)

Possible fixes as follows:

Issue 1: Add a call to CheckValue to the vtString case in TJvSpinEdit.SetValue().

Issue 2: Add a code to adjust the MaxValue in TJvCustomSpinEdit.SetItems(). Something like this, perhaps:
FMaxValue := Math.Max(FMaxValue, FItems.Count-1);

p.s., for a more severe crash (as in crash during form creation) related to issue 0000001, set the MinValue property of JvSpinEdit1 to 1, for instance. I believe that the potential solution above will address this crash as well.
Tags No tags attached.
Attached Files zip file icon [^] (58,491 bytes) 2015-06-05 02:22

- Relationships

-  Notes
sambo (reporter)
2015-06-05 02:25

Hmm... my last p.s. comment was incorrectly formatted because I used a hash sign instead of the word "number". So, the text should actually read:

.... related to issue number 1, set the MinValue property....

- Issue History
Date Modified Username Field Change
2015-06-05 02:22 sambo New Issue
2015-06-05 02:22 sambo File Added:
2015-06-05 02:25 sambo Note Added: 0021168
2015-09-14 11:28 obones Status new => acknowledged
2015-09-14 17:35 obones Status acknowledged => resolved
2015-09-14 17:35 obones Fixed in Version => Daily / GIT
2015-09-14 17:35 obones Resolution open => fixed
2015-09-14 17:35 obones Assigned To => obones
2015-09-21 17:47 obones Fixed in Version Daily / GIT => 3.49

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