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
0005925 [JEDI VCL] 00 JVCL Components tweak always 2012-06-28 15:29 2015-09-21 17:47
Reporter tetardd View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.45
Summary 0005925: Sort mess in variable names in JvURLListGrabber
Description There are a 2 variables called "Status" in these objects: one of type TJvGrabberStatus, the other is more obscure (see below).

I'd recommend to sort the mess and stop calling them all "Status". Why not having "FState" or "FAction" for the TJvGrabberStatus, and FInternetStatus for TJvCustomURLGrabberThread (although its purpose is weird, see below).

Procedure TJvLocalFileUrlGrabberThread.Grab is doing something weird:

Status := Grabber.BytesRead;

What is the purpose of this "Status" variable (should it be called "BytesRead" instead?), and why is it arently clashing with the status set in DownloadCallBack that is not handling bytes read by real internet connection status?
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0020342)
obones (administrator)
2013-01-15 15:10

Good point, this has to be reviewed
(0020829)
obones (administrator)
2013-12-13 15:47

Ok, now I get it.
The Status property for TJvCustomUrlGrabber is to indicate what it currently is doing
The Status property for TJvCustomUrlGrabberThread is a numerical value whose interpretation depends on the type of URL being grabbed.
For http/ftp, it's the wininet status (INTERNET_STATUS_RESOLVING_NAME, INTERNET_STATUS_NAME_RESOLVED...)
For files, it's the number of bytes read.

That second "Status" property is actually only used internally because it is protected in the TJvCustomUrlGrabberThread class and should never be accessed outside these classes.

I will rename the second one to APIStatus so as to avoid confusion when reading the source code.
(0020830)
obones (administrator)
2013-12-13 15:49

This is now done in GIT

- Issue History
Date Modified Username Field Change
2012-06-28 15:29 tetardd New Issue
2013-01-15 15:10 obones Note Added: 0020342
2013-01-15 15:10 obones Status new => acknowledged
2013-12-13 15:47 obones Note Added: 0020829
2013-12-13 15:47 obones Status acknowledged => feedback
2013-12-13 15:49 obones Note Added: 0020830
2013-12-13 15:49 obones Status feedback => resolved
2013-12-13 15:49 obones Fixed in Version => Daily / GIT
2013-12-13 15:49 obones Resolution open => fixed
2013-12-13 15:49 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