ft_notsupported

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

ft_notsupported

Post by *Lefteous »

I just saw this constant value in the contentplug.h page of the plugin docu. The search in the help lists it only there but it's not explained where and how to use this flag. Any idea?
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

The comments in the same H file tell:
// for ContentGetValue
...
#define ft_notsupported -5 // function not supported
I suppose, this value is reserved for a situation when TC (by mistake) asks the plugin to retrieve a field having no meaning for the particular file. Or something like that.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Flint
Well of course the I read the comment in the header but that doesn't explain anything.
I suppose, this value is reserved for a situation when TC (by mistake) asks the plugin to retrieve a field having no meaning for the particular file. Or something like that.
For this case ft_nosuchfield should be used.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

ft_notsupported should be returned for example by ContentSetValue if the function doesn't support the change of that specific field for that file.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

OK thanks for the info - a better documentation is appreciated. I don't really understand why a new flag is necessary. A few weeks ago you told me to use ft_nocsuchfield and I haven't had problems with this error value.
Post Reply