View Issue Details

IDProjectCategoryView StatusLast Update
0005925JEDI VCL00 JVCL Componentspublic2015-09-21 17:47
ReportertetarddAssigned Toobones 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.45 
Target VersionFixed in Version3.49 
Summary0005925: Sort mess in variable names in JvURLListGrabber
DescriptionThere 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?
TagsNo tags attached.

Activities

obones

2013-01-15 15:10

administrator   ~0020342

Good point, this has to be reviewed

obones

2013-12-13 15:47

administrator   ~0020829

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.

obones

2013-12-13 15:49

administrator   ~0020830

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