View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002349 | JEDI VCL | 00 JVCL Components | public | 2004-11-30 02:16 | 2005-01-01 08:56 |
| Reporter | anonymous | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | open | ||
| Product Version | 3.00 BETA 2 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0002349: JvDriveCombo - Index error if no removable Drive present | ||||
| Description | If a PC has no removable drive and drivetype is set to [dtremove] then there will be an error message (free translatet): "Error reading JvDriveCombo1.ImageSize: list index exceeds maximum(0)". | ||||
| Additional Information | New laptops doesnt have a disk drive and only sometimes a card reader. | ||||
| Tags | No tags attached. | ||||
|
|
Is this with the latest version from CVS (v 1.40 in file header)? |
|
|
The Version is: // $Id: JvDriveCtrls.pas,v 1.40 2004/09/01 15:06:38 ahuser Exp $ |
|
|
I can't reproduce this and it's very weird that it says "ImageSize: list index exceeds maximum", 'cause ImageSize is not a list, it is an enum... |
|
|
Yes, you are right. I looked into the source code and could not find a reason. The german error message is: "Fehler beim Lesen von TransferDrive.ImageSize: Listenindex überschreitet das Maximum(0)" where TransferDrive is the name of the component on the form. Could it be that the image for the first selected drive should be displayed, but there is no drive in the list (because no removable drive is in the pc) and the itemindex for the system icon image list is -1? In the code of DriveCombo the selected drivetypes ist set to [dtfixed] if no drive is selected (at designtime). But the error is at runtime on a second pc (so there is no drive in the selectlist at runtime) which does not have a removable drive. |
|
|
> Could it be that the image for the first selected drive should be displayed, > but there is no drive in the list (because no removable drive is in the pc) > and the itemindex for the system icon image list is -1? I don't think so. Even if the index is -1, the only place the image index is accessed is in the FImages.Draw call in DrawItem() and if the index is invalid, the result should be no image drawn. Besides the DrawItem never access the ImageSize property: that is only done when the imagelist is created. Could you try creating the JvComboBox in code and see if that helps? My problem is that I do have a removable drive (floppy), so I am trying to simulate an invalid state by setting DriveTypes to dtRamDisk (which I donät have), but I am not able to generate any error: the only thing that happens is that the combobox is empty (as it should be). |
|
2004-12-04 10:16
|
|
|
|
Ok, i will make a test app with DriveCombo generated in code. |
|
|
I have checked with floppy disabled in BIOS and got an empty list without any errors (v 1.40). I have added dynamic drive detection to react to plugs of USB sticks etc. |
|
|
I made a little test programm and send it to my friend with the laptop without removable drive. I set the Drivetype to [dtfixed]. My freind tried all combinations of DriveType (which he can set at runtime with checkboxes), but can not reproduce the problem with the testprogramm. So i will try to recompile my application and sent it to my friend once again. I am very tieredthat i can not reproduce it on my own pc, because i have at least a build in memory stick drive (it's not a trick...). Ok, so lets close this thread until i will clearly see the problem (perhaps there is a problem with another component in combination with JvDriveCombo). |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2004-11-30 02:16 | anonymous | New Issue | |
| 2004-11-30 12:33 |
|
Note Added: 0005794 | |
| 2004-11-30 12:33 |
|
Status | new => feedback |
| 2004-12-01 22:36 | anonymous | Note Added: 0005802 | |
| 2004-12-02 12:11 |
|
Note Added: 0005807 | |
| 2004-12-04 00:16 | anonymous | Note Added: 0005823 | |
| 2004-12-04 05:51 |
|
Note Added: 0005828 | |
| 2004-12-04 10:16 | anonymous | File Added: Bild1.jpg | |
| 2004-12-04 10:17 | anonymous | Note Added: 0005830 | |
| 2004-12-26 22:37 | robert_marquardt | Note Added: 0006018 | |
| 2004-12-30 12:31 | anonymous | Note Added: 0006041 | |
| 2005-01-01 08:56 | obones | Status | feedback => closed |