Sort by field from content plugin

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
MiDoS
Junior Member
Junior Member
Posts: 21
Joined: 2005-02-03, 11:54 UTC

Sort by field from content plugin

Post by *MiDoS »

I have some plugin, that show file size like three digits and one letter (10 M, 125 k, 682b), but if I try to sort by this column, they sort as strings.

May be include in wdx interface some new function, that receve parameters two file names, and fiel name, and return -1, 0 or 1 if field value is less, equel or more, and Total Commander will sort with this function?

Sorry for my english, it isn't my native language. May be someone translate it better?

У меня есть плагин, ктоторый показывает размер файла в виде трех цифр и одной буквы (10 M, 125 k, 682b), но если я пытаюсь отсортировать по этой колонке, сортируется как строки.

Может быть включить в интерфейс wdx новую функцию, которая будет получать как параметры именя двух файлов, и имя колонки, и будет возвращать -1, 0 или 1 если значение этой колонки меньше, равно или больше, а Тотал Коммандер отсортирует с помощью этой функции?

Пожалуйста, переведите этот текст более правильно
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2MiDoS
What plug-in? Maybe I can help you as I wrote a plug-in dealing with such values.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have some plugin, that show file size like three digits and one letter (10 M, 125 k, 682b), but if I try to sort by this column, they sort as strings.
Apparently the plugin returns a string and not a number. There is already an option to return both a numeric value (for sorting and searching) and a string in the plugin interface.
Author of Total Commander
https://www.ghisler.com
Post Reply