View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005925||JEDI VCL||00 JVCL Components||public||2012-06-28 15:29||2015-09-21 17:47|
|Target Version||Fixed in Version||3.49|
|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?
|Tags||No tags attached.|
||Good point, this has to be reviewed|
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.
||This is now done in GIT|
|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|