FSplugin and Custom Column ft_date

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
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

FSplugin and Custom Column ft_date

Post by *djorge »

Hi,
i'm getting problems while returning a ft_date as a custom column.

Interface says:
ft_date: FieldValue points to a structure containing year,month,day as 2 byte values.

so i assume that a struct like this one will do the job:
typedef struct maydate_t{
short year;
short month;
short day;
} maydate_t;

Now for testing purposes i created a struct and assigned it to FieldValue
maydate_t* date = new maydate_t();
date->day=4;
date->month=3;
date->year=2010;

FieldValue = date;

In tc i get weird values and not 2010-03-04 in the custom column.

Currently i have 2 custom column. The first one is a boolean which is working fine and the second one is supposed to be a date. In this case which value should be fiedUnit for my second custom column (which is now an empty string)?

char* fieldnames[fieldcount]={
"Encrypted","Expired Date"};

int fieldtypes[fieldcount]={
ft_boolean, ft_date};

char* fieldUnit[fieldcount]={
"Boolean", ""};

What am i missing?

Thanks in advance.
______________________
David Jorge
Personal License #117854
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

What am i missing?
Click on pdateformat structure in content plugin interface help file for an example on how to use it correctly.
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

Thank you Lefteous. I will do that as soon as i get home.

I am using the wrong datatype! my fault.
______________________
David Jorge
Personal License #117854
Post Reply