Bug?: units in FileSys.wdx plugin

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Bug?: units in FileSys.wdx plugin

Post by *Alextp »

Hello,
Filesys sample plugin:
It does the same as the (int) built-in content plugin
Author: Christian Ghisler
For this plugin TC shows these units for field "size": bytes, kbytes, Mbytes, Gbytes, bkM, bkM2.
But I tested this plugin with WDX Guide: it has only units: bytes, kbytes, Mbytes, Gbytes.
This is maybe a TC bug: from where it gets units "bkM, bkM2"?
And if you look into .wdx file, you'll see string "bytes|kbytes|Mbytes|Gbytes", without "bmM|bkM2"...
Last edited by Alextp on 2005-09-29, 14:40 UTC, edited 1 time in total.
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Alextp
For this plugin TC shows these units for field "size": bytes, kbytes, Mbytes, Gbytes, bkM, bkM2.
But I tested this plugin with WDX Guide: it has only units: bytes, kbytes, Mbytes, Gbytes.
This is maybe a TC bug: from where it gets units "bkM, bkM2"?
And if you look into .wdx file, you'll see string "bytes|kbytes|Mbytes|Gbytes", without "bmM|bkM2"...
I don't understand how you come to the conclusion that this could be a TC bug. TC detects unit names which indicate a size field, automatically adds and calculate these two dynamic size units.
You may take a look at DirSizeCalc where these units are also added automatically. The plugin supports even user-defined units but they are completely handled by the plugin not by TC.
WDX Guide simple doesn't provide the whole functionality of the internal content plugin system.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Lefteous wrote:TC detects unit names which indicate a size field, automatically adds and calculate these two dynamic size units.
I understood, thanks.
But _how_ it determines if it's "size" field or not? By type (ft_numeric64)?
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Alextp
But _how_ it determines if it's "size" field or not? By type (ft_numeric64)?
As I wrote by unit name. :wink:
To make TC providing these values the plugin has to set at least the size names "bytes|kbytes".
Post Reply