Add parameters to the commands

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Jqn
Member
Member
Posts: 171
Joined: 2003-02-26, 16:42 UTC
Location: Madrid (Spain)

Add parameters to the commands

Post by *Jqn »

Hi,

It will very useful, if the commands were accepting parameters. Probably not all the commands, but some of them:

1) It allows to add new functions:
cm_50percent OR cm_50percent() .. Default mode (50/50)
cm_50percent(20/80) .. Show left 20% right 80%

2) It allows to substitute olds commands:
cm_Show(left, brief) .. Show left window in brief mode like cm_LeftShort
cm_Show(right, comments) .. Show right window in comments mode like cm_RightComments

I'm sure of the fact that you will find more uses of this system.

Joaquin

3) It allows to create a new command to execute anothers commands:
cm_Execute(cm_50percent(20/80), cm_Show(left, brief), cm_Show(right, comments)
OR execute from file:
cm_Execute(@file.ext)
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Good idea---

Post by *Clo »

2Jqn
:D   Hi Joaquin!
• A good idea in the principle, I support it.
¤ But I don't know if it could be supported by Delphi2™ ?

:mrgreen:  KR
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Jqn wrote:It will very useful, if the commands were accepting parameters. Probably not all the commands, but some of them:
The cm_xxx commands are menu commands. They can be assigned to menu item if you write your own main menu (see Total Commander Help 4.c. Change main menu). That is why they do not accept parameters.
The menu commands are also made available as command in the button bar etc. If it is at all technically possible to let the menu commands accept parameters, I think this is not the thing to do. It is better to create a new internal command.
There are already some internal commands which are not menu commands. Examples: "cd", "appendtabs", "zipfromlist", "ftpopen". These commands do accept parameters.
I have also made some suggestions for the internal commands here (see point 6).
Clo wrote:¤ But I don't know if it could be supported by Delphi2? ?
Do you know for sure he uses Delphi2? I know about the text in the help file:
Development of Total Commander

Total Commander was written utilizing Borland Delphi 1.0 (16 bit) and 2.0 (32 bit) (© 1993-96 by Borland International).
Maybe it just says Total Commander was originally developed using Delphi2. Maybe it says nothing about what (version of) software is used when the program was developed further.

2Clo BTW. Did you receive my email?
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Not received

Post by *Clo »

2white
Did you receive my email?
Hello!
:(  Sorry, no. I just checked my mail-box: nothing... but spams!
• Please, send it again, and place a TC- as the beginning of the subject.
• You may try too directly: charriesatwanadoodotfr
EDIT: about the subject

• Though I'm not a programmer, I know that Delphi 2 ™ is pratically the same than Delphi 1, but in 32-bit, hence without the 16-bit restrictions (names lenght, spaces in names etc.)… So, to transform the first 16-bit version into 32-bit wasn't very difficult, I guess.

• Most certainly, Mr. Ghisler has the most recent Delphi editions! But they are very different...
¤ An example: a friend programmer had to upgrade a Delphi 1 program (HTML editor) into Delphi 5: that needed a full codes new writing. Then, one year of tests and updates to get a soft usable by everybody…
• These new Delphi softs allow to add many "cosmetic-things" in the program, but I don't think that it's desirable for TC; it must remain still a great and powerful tool, not becomes a X-Mas fir-tree! Of course, the authors are not forced to add a lot of "nice-to-have" in excess…but it's still tempting, moreover when it is possible!
• Soon or later, the whole TC shall be written again in a newer Delphi - perhaps, it's only my opinion -, but it's a huge work, not indispensable while the current writing has not reached the Delphi2 limits.
:mrgreen: Kind regards,
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Post Reply