Sortorder= differs between TC 8.52a (OK) and 9.12 (wrong?)

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

petermad wrote:
NO, this too can not be the final solution, because after leaving a view mode, there are problems
Like what?
For example:
1. Auto Switch Mode - +: Must match *\~Noch-zu-entwickeln\ - Set this mode: Dateianzahl_Unterverzeichnisse_Größen
    The file number, subdirectories and bytes are displayed in the path "D:\Bilder\~Noch-zu-entwickeln"

    If the path D:\Bilder is called, then the view mode should be ended (at least that was the case so far).
    However, the data will continue to be calculated and displayed.
    Even if the path D:\*.* is called, calculations and displays are still taking place, i.e. the View Mode has still not ended.

2. In another view mode, I now have to move up 2 (instead of 1) directory levels until the view mode finishes (that was not the case before).
3. Auto Switch Mode - +: Must match - D:\Bilder\EIZO\ - Set this mode: Bildvorschau (Thumbnails)
    When I switch to D:\Bilder, the thumbnail view does not finish.

"Unchanged" in View Mode "Folder" is the trigger.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Did you see my report about the wrong sort order values in 3 of your View Modes?

Ahh yes, unless you have a |cm_SrcViewMode0 command, the view mode will not automatically go back to default just because you change directory, so for view modes that changes the sort order you need |cm_SrcViewMode0 - but that is how it has to be no matter what, if you want to use any of the A, S, V, P, D, U and L Auto Mode shifts.

Notice if you have an em_command before the | then there can not be a space between the em_command and the |. Tc will look for a command that ends with a space then.

So any View Mode that changes either the Columns view or the Sort order should have a |cm_SrcViewMode0 command.


If you just want the Columns view to be set to Full when you leave a dir with an Auto Shift view, then just set Columns view to Full for the "Folder" View Mode. This will probably be the best for you, then you just have to add |cm_SrcViewMode0 to your "Fehlerreports" and "Sortierung_absteigend" views, and everything should work as before.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

2petermad
After you have found a solution, I would like to illustrate this in more detail with the help of a simple example:

Purpose:
I would like that only in a certain directory with pictures the 'Thumbnail view' is switched on.
After leaving this directory the View Mode <Default> should be restored.

0.   View Mode <Default>
0.1 Columns view: Full
0.2 Sort order: Name
**********************************************************************************
1.   Create a View Mode "Bildvorschau Thumbnails"
1.1 Columns view: Thumbnail view
1.2 Sort order: Name
2.   Create an Auto Switch Mode
2.1 +: Must match -> D:\Bilder\EIZO\
2.2 Set this mode: Bildvorschau (Thumbnails)

This View Mode + Auto Switch Mode works fine (exclusive sorting after TC restart).
**********************************************************************************
If I know about of the forum posts and your very in-depth analysis,
that sorting after TC restart is retained only after a fine tuning in TC,
then, in addition to the above points, I have TO DO THE FOLLOWING/NOTE THE FOLLOWING:

1.   In the View Mode "Bildvorschau Thumbnails", under "Auto-run commands:", enter |cm_SrcViewMode0
1.1 For some View Modes, be sure to include |cm_SrcViewMode0 in field "Auto-run commands:"
2.   Create a View Mode "Folder"
2.1 Leave the "Columns view" and "Sort order" set to "Unchanged"
3.   Create an Auto Switch Mode
3.1 Rule: L: With drive letter
3.2 Set this mode: Folder
3.3 Since the Auto Switch Mode-rules are processed from top to bottom, always make sure that no other rule overrules this set rule!
**********************************************************************************
With this additional View Mode + Auto Switch Mode and additional setting in each view mode it works now for me -
even the sorting is restored after TC restart!

If it stays that way, then the explanations in the Help (F1) under Configuration - Operation - Save on exit - Panels (brief/full, etc.)
would have to be adapted in my opinion (..."This includes Brief / Full / Tree, All files / Programs /Custom, and the sort order...").
Because without additional settings as stated, the sorting is not preserved.

Now I'm beaten and I'm already on the way to frame your instructions ;-).
Whether this additional effort is justified for a user, stands for me on a different sheet, because of user-friendliness,
we are here far away.

For me it remains to be desired that this additional required View Mode and Auto Switch Mode will NOT lead at some point
to an unforeseen problem in another View Mode (see also pt. 3.3 above).

----------------------------------------------------------------------------
petermad wrote:Notice if you have an em_command before the | then there can not be a space between the em_command and the |.
TC will look for a command that ends with a space then.
Such a case I have not had in my View Modes, but thanks for the hint.

Thank you again for your efforts!

Regards
Karl
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Notice if you have an em_command before the | then there can not be a space between the em_command and the |.
TC will look for a command that ends with a space then.


Such a case I have not had in my View Modes, but thanks for the hint.
I have also noticed that you cannot have a space AFTER the | .

So these works:
cm_command|cm_command
cm_command |cm_command

And these does not work:
cm_command| cm_command
em_command |cm_command (causes an error-sound)
| cm_command

You had 3 instances of | cm_SrcViewMode0 in your [ViewModes] section in your prior posting, - so if thy are still there you'd better change them to |cm_SrcViewMode0.


2ghisler(Author)
While it is OK that a space behind an em_command causes a fail, unless the command actually has a space in the name, I think that space right after a | should be ignored - or it should be emphasized in the Help to avoid spaces before and after the |
Last edited by petermad on 2018-02-22, 15:16 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

petermad wrote:... You had 3 instances of | cm_SrcViewMode0 in your [ViewModes] section ...
Yes, thank you for pointing this out again!

Because of your hint regarding spaces on em_commands, I already had all the commands in the view modes
checked in the field "Auto-run commands:". Corrections have already been made, i.e.
  
- at two View Modes, i.e. "Hintergrund_GELB" and "Hintergrund_GRÜN" I have | cm_SrcViewMode0 completely removed,
  as these View Modes did not work properly (I suppose I accidentally inserted spaces at some point.)

- in View Mode "Suche", I have also removed the spaces with command "cm_OpenNewTab | cm_SrcViewMode0".
  The search result should be opened after clicking on "Apply" in a new tab.

Thanks again!
Post Reply