Page 1 of 1

CC behaves different depending of its #index.

Posted: 04 May 2026 12:18
by eil
Unless i'm strongly wrong and not knowing some info, i find it strange that CC may work different depending of its index in CC list.
After recently CC bar getting text abilities, i decided to update long used scripted size ribbon column. I actually don't remember how i did create that as one of top CC indexes(so called "global" ones), but i'm sure that was for easy adding it in any Details view. And for a long time i had a problem - that column "got cleared" after switching to other tabs. Well, i thought that was connected to using Cached Sizes and obediently refreshed it manually. So i was really surprised when after updating i accidentally added new CC by index 19 and it doesn't get cleared.!

That was the story, now the reproduction steps in latest fresh 27.20.1220.
Here's the snipper of CC:

Code: Select all

Snip: CustomColumn 1
  XYplorer 27.20.1400, 04.05.2026 13:10:34
Action
  ConfigureColumn
Caption
  Size Ribbon
Type
  3
Definition
  $size = "<cc_size>";
    switch (true){
        case $size == 0: return ''; // draw nothing
        case $size < 10240: return '>draw.bar ' . 100 * $size \ 10240 . ', E0E2ED|' . formatbytes($size); //smaller 10KB  grey
        case $size < 102400: return '>draw.bar ' . 100 * $size \ 102400 . ', D500FA, E0E2ED|' . formatbytes($size); //smaller 100KB  pinky
        case $size < 1048576: return '>draw.bar ' . 100 * $size \ 1048576 . ', 7B20A3, D500FA|' . formatbytes($size); //smaller 1MB  violet
        case $size < 104857600: return '>draw.bar ' . 100 * $size \ 104857600 . ', 304FFF, 7B20A3|' . formatbytes($size); //smaller 100MB  blue
        case $size < 524288000: return '>draw.bar ' . 100 * $size \ 1073741824 . ', 13DD17, 304FFF|' . formatbytes($size); //smaller 500MB  green
        case $size < 1073741824: return '>draw.bar ' . 100 * $size \ 10737418240 . ', FFFF01, 13DD17|' . formatbytes($size); //smaller 1GB  yellow
        case $size < 5368709120: return '>draw.bar ' . 100 * $size \ 107374182400 . ', FF7900, FFFF01|' . formatbytes($size); //smaller 5GB  orange
        default: return '>draw.bar ' . 100 * $size \ 1099511627776 . ', FE0000, FF7900|' . formatbytes($size); //from 10GB to 1TB  red
    }
Format
  7
Trigger
  0
Item Type
  2
Item Filter
1. Enabled Cached Size in fresh instance.
2. In CC settings picked any of top indexes, say Camera model, and edited it with this snippet into scripted CC.
3. Selected empty index 19 and added very same CC via snippet only changing a name for difference.
4. Added both to list and for some reason #19 works right away and doesn't clear, while the #4 requires manual refresh.
2026-05-04_131559.png
2026-05-04_131623.png
2026-05-04_131637.png
2026-05-04_131742.png