Mistake at addition of the user commands in the menu

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

Post Reply
User avatar
Andrey_A
Junior Member
Junior Member
Posts: 12
Joined: 2010-06-02, 21:44 UTC
Contact:

Mistake at addition of the user commands in the menu

Post by *Andrey_A »

Mistake at addition of the user commands in the menu:

Code: Select all

Unknown identifier in line 2005 of the menu file: em_2001
Is number of users commands by 2000 items? If yes, why? Can it be increased? Add please still !!!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, it's limited to 2000 commands, sorry. Currently there are no plans to increase that.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14913
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2ghisler(Author)
it's limited to 2000 commands
Is that for both usercmd.ini and and wcmd_xxx.ini in total or can the number be increased by using both files?
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

That's for all user-defined (em_xyz) commands together. It cannot be increased by splitting to two files.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Sorry but I don't understand any reason for such limits. Or TC uses static internal array for keeping usercommands in memory?
User avatar
petermad
Power Member
Power Member
Posts: 14913
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

It seems to me that TC reads the user commands from file and does not keep it in memory, because if you change a user command manually in the usercmd.ini or the wcmd_xxx.ini file with a text editor, TC recognizes the change without having to be restarted. Unlike when wincmd.ini is changed the same way.

So a 2000 command limit doesn't seem to be necessary.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

They are loaded into a fixed array of pointers to the strings in some functions, which is usually much faster than a dynamic list. The limit is 4 times the number of internal commands, so I thought that no one would ever reach it...
Author of Total Commander
https://www.ghisler.com
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

There is no speed difference if you create an array with dynamic size. You do not need to create a list...
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Samuel wrote:There is no speed difference if you create an array with dynamic size. You do not need to create a list...
Agreed. Dynamic arrays usually have possibility to set reserved size - so it can be used as first-time limit (it user exceeds this limit, he will need to wait while array is reallocated).
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6532
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

I would like to know what is the purpose of so much user defined commands ?
User avatar
Andrey_A
Junior Member
Junior Member
Posts: 12
Joined: 2010-06-02, 21:44 UTC
Contact:

Post by *Andrey_A »

Here my files for the menu

rghost.ru/download/1837542/89416bb262c49c11ab2fb95b6a8b34b2bbb0c6bf/Total.zip

For someone it will seem much, but I dream of increase with 2000 up to 4000
Post Reply