Page 1 of 1

Sort by field from content plugin

Posted: 2006-11-01, 17:23 UTC
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 если значение этой колонки меньше, равно или больше, а Тотал Коммандер отсортирует с помощью этой функции?

Пожалуйста, переведите этот текст более правильно

Posted: 2006-11-01, 17:26 UTC
by Lefteous
2MiDoS
What plug-in? Maybe I can help you as I wrote a plug-in dealing with such values.

Posted: 2006-11-01, 22:41 UTC
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.