DetectString length limitation

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
ctiberg
Member
Member
Posts: 194
Joined: 2003-10-24, 14:10 UTC
Location: Kristianstad, Sweden

DetectString length limitation

Post by *ctiberg »

Hello!

We made an image lister plugin, that can read a whole lot of different image formats. We also made the detectstring list all the extensions, but then it got about 500 characters in length, which seems to be too much for Total Commander.

So we think that we'll have to skip the DetectString completely, and then run an extension check every time the plugin is loaded, and then return an error if we can't handle the file.

This seems far from optimal, but we can't find any other way to do it. Can anyone of you?
Best regards,
Christian Tiberg
User avatar
deus-ex
Power Member
Power Member
Posts: 969
Joined: 2003-02-10, 17:45 UTC

Post by *deus-ex »

Workaround:
List your Plugin several times in "Wincmd.ini".

Code: Select all

[ListerPlugins]
0=<drive><pluginpath><ctiberg-pluginname>
0_detect="ext="001" | "002" | "003" ... "
1=<drive><pluginpath><ctiberg-pluginname>
1_detect="ext="100" | "101" | "102" ... "
...
I don't know the limit of the detectionstring, but that
should'nt be to hard to find out with "Trial and Error". :wink:
User avatar
ctiberg
Member
Member
Posts: 194
Joined: 2003-10-24, 14:10 UTC
Location: Kristianstad, Sweden

Post by *ctiberg »

Hmm.. The trouble isn't how it's listed in the INI file, but what the plugin returns from the ListGetDetectString (or whatever the function is called) call. We can't very well split that one :) And telling users to edit their INI file surely isn't an option either, since this would exclude many users from using it.
Best regards,
Christian Tiberg
Post Reply