WDX: Return a blank value

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
petergus
Member
Member
Posts: 164
Joined: 2003-02-06, 16:28 UTC
Location: Sweden, Enköping
Contact:

WDX: Return a blank value

Post by *petergus »

Hi!

Content plugin problem!

How return a nil (blank value) if my field type is ft_numeric_32?

I created a function that deal with folders only, how can I prevent
any values being shown on files.

// Peter
User avatar
Flint
Power Member
Power Member
Posts: 3511
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

Return ft_fieldempty constant or ft_fileerror in ContentGetValue function. In this case no matter what you write into FieldValue.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
petergus
Member
Member
Posts: 164
Joined: 2003-02-06, 16:28 UTC
Location: Sweden, Enköping
Contact:

Post by *petergus »

Flint wrote:Return ft_fieldempty constant or ft_fileerror in ContentGetValue function. In this case no matter what you write into FieldValue.
I tried ft_fieldempty, but I only get a -3 value in TC.

// Peter
User avatar
Flint
Power Member
Power Member
Posts: 3511
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

What if you try the simpliest implementation of ContentGetValue? Here is an example in C++:

Code: Select all

int __stdcall ContentGetValue(char* FileName, int FieldIndex, int UnitIndex,
                              void* FieldValue, int maxlen, int flags)
{
    return ft_fieldempty;
}
What does TC show in this case?
User avatar
petergus
Member
Member
Posts: 164
Joined: 2003-02-06, 16:28 UTC
Location: Sweden, Enköping
Contact:

Post by *petergus »

Flint wrote:What does TC show in this case?
Yes, that worked. But I have found that the example I found here:
http://www.ghisler.ch/board/viewtopic.php?t=5808
is wrong.

Anybody see what's wrong?

// peter
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2petergus
Anybody see what's wrong?
Can you give a hint where exactly in the example can be found?
User avatar
petergus
Member
Member
Posts: 164
Joined: 2003-02-06, 16:28 UTC
Location: Sweden, Enköping
Contact:

Post by *petergus »

Lefteous wrote:2petergus
Can you give a hint where exactly in the example can be found?
You can found the example in a reply by franck8244, the last entry in the
thread.

Something is wrong with the ContentGetValue Function, if I use anyone of
the constants ( ft_fieldempty ) TC show the value not, in this case, hide the field.

// Peter
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2petergus
What is the difference between an empty field and a blank value?
User avatar
petergus
Member
Member
Posts: 164
Joined: 2003-02-06, 16:28 UTC
Location: Sweden, Enköping
Contact:

Post by *petergus »

Lefteous wrote:2petergus
What is the difference between an empty field and a blank value?
How can I add a blank value when fieldtype is ft_numeric_32?

// peter
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2petergus
How can I add a blank value when fieldtype is ft_numeric_32?
It doesn't matter which field type has been returned in ContentGetSupportedField. Just return ft_fieldempty as shown in http://www.ghisler.ch/board/viewtopic.php?p=54848#54848
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

2petergus
I sent you a few explanation by email, have you received them ?
TC#88260 -
User avatar
petergus
Member
Member
Posts: 164
Joined: 2003-02-06, 16:28 UTC
Location: Sweden, Enköping
Contact:

Post by *petergus »

franck8244 wrote:2petergus
I sent you a few explanation by email, have you received them ?
Yes, my plugin now works perfect. Thanks!

// Peter
Post Reply