Uniquely named custom column configs (more custom column configs)

From TotalcmdWiki
Revision as of 11:26, 6 August 2006 by Lefteous (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

2[b]ghisler(Author)[/b] Today a user requested to increase the number of custom columns configs: http://www.ghisler.ch/board/viewtopic.php?t=11350

I want take this opportunity to renew my request to load columns by names instead of numbers. You requested that this change must be back and forward compatible. I have found a way to achieve this now. Here is the description:

[b]Scenario 1:[/b] A user just changed from 6.55 to 7 and wants to edit column config #1:

Before the change the settings looked liked that:

[code]Titles=Search result|..other titles.. Widths1=69,86,300,128 Headers1=Pfad\nAenderungsdatum Options1=-1|1 Content1=[=tc.path]\n[=tc.writedate][/code]

Now he makes the following changes: [code]Titles=Search result|...other titles... Widths1=69,86,300,128,20 Headers1=Pfad\nAenderungsdatum\nGröße Options1=-1|1 Content1=[=tc.path]\n[=tc.writedate]\n[tc.Size][/code]

Now TC saves the changes but also creates the following new settings: [code]WidthsSearch result=Widths1 HeadersSearch result=Header1 OptionsSearch result=Options1 ContentSearch result=Content1[/code]

Remarks:[list][*]This means that there is a corresponding numeric column config. When the user called a column config by its name TC reads tgis settings first. Then TC detects the reference and get the values from the numeric values. TC always stores these settings like that when there are <= 29 columns defined. [*]In TC 7 the user can now access the configs with there friendly name. That means there are commands like SOURCELOADCOLUMN columnname (as well as LEFTLOADCOLUMN, RIGHTLOADCOLUMN, TARGETLOADCOLUMN). [*]When resorting or deleting the references must be updated by TC! [*]If a user saves a column config in TC 7 which already has an equally named setting Tc displays the warning message (string 1212 in lng file).[/list]

[b]Scenario 2:[/b] The user wants to create a new column but there are already 29 defined. If there are already 29 columns configs defined TC creates a "named only" setting. This is no problem as TC 6.55 supports only 29 coloumn configs. This would look like this:

[code]WidthsSearch result=69,86,300,128,20 HeadersSearch result=Pfad\nAenderungsdatum\nGröße OptionsSearch result=-1|1 ContentSearch result=[=tc.path]\n[=tc.writedate]\n[tc.Size][/code]

[list][*]The "Titles" setting doesn't have to be updated. The title is uniquely stored behind each named column config setting [*]I have tested this in 6.55. These new settings are not read by TC 6.55 and cause no trouble at all. When using 6.55 the user can still access the configs between 1 and 29.[/list]

[b]Conclusion:[/b] This suggestion doesn't change anything for a TC 6.55 user even if he uses a TC 7 ini file. Instead new settings are created which extend the functionality. The advantages are that TC handles the resorting/delete problematic even for old column configs and let the user call a column config way easier.

What do you think? :-)