Page 1 of 1

TCalex: Show bad Mouth View

Posted: Wed Dec 11, 2019 10:42 am
by Silvio.Falconi
I'm using TCalex Classes of Fivewin ( not link any tcalex class into my application)

In Italy we have to set the beginning of the week on Monday through Sunday and the hours are set from 08.00 in the morning to 20.00 in the evening.

Image

Problems :
today is Wednesday 11 December and the monthly calendar lights up the "Wednesday" column but then moves the day 11 box to the "Thursday" column ... as you can see on this snapShot

If you see better December 1st was Sunday and Tcalex instead inserts the first of December to Monday

Code: Select all

 DEFINE CALEX oApp():oCalex OF oApp():oPanelCalex;
          FIRST_DATE 1
making some test if you try with :

FIRST_DATE 7 run ok the mounth init from Sunday the 1th December go to sunday and the 11 december go to Wednesday
FIRST_DATE 6 run ok the mounth init from Saturday the 1th December go to sunday and the 11 december go to Wednesday
FIRST_DATE 5 run ok the mounth init from Friday the 1th December go to sunday and the 11 december go to Wednesday
FIRST_DATE 4 run ok the mounth init from Thursday the 1th December go to sunday and the 11 december go to Wednesday
FIRST_DATE 3 run ok the mounth init from Wednesday the 1th December go to sunday and the 11 december go to Wednesday
FIRST_DATE 2 run ok the mounth init from Tuesday the 1th December go to sunday and the 11 december go to Wednesday

FIRST_DATE 1 not run the mounth init from Monday the 1th December go to Monday and the 11 december go to Thursday

FIRST_DATE 0 not run the mounth init from Monday the 1th December go to Monday and the 11 december go to Thursday

Any Solution?

On Week view is ok as you can see here :

Image



if you press the button ">" ( you see on the picture with red circle) you can move to another week ..ok

Image

but if you come back, pressing the button "<" then not see the records on prev week,

Image


but the records there are on the week ( see the prev snapshot)


Any solution please ?

Re: TCalex: Show bad Mouth View

Posted: Wed Dec 11, 2019 4:19 pm
by Otto
Hello Silvio,
I have tried briefly with mod harbour, if you could realize such a calendar. I think it works.
I included the daypilot component in Genesis.

I know that does not help much with TCalex, but maybe you can start with mod harbor. I think that's easier.

I think we are in the same situation today as when Fivewin Clipper replaced.
Web programs are what WINDOWS used to be in DOS times.


Best regards,

Otto

Image

Re: TCalex: Show bad Mouth View

Posted: Thu Dec 12, 2019 3:19 am
by Jimmy
Silvio.Falconi wrote:Any solution please ?
äh, em ... which EPOCH do use :?:

Code: Select all

   SET EPOCH TO YEAR( DATE() ) - 50

Re: TCalex: Show bad Mouth View

Posted: Thu Dec 12, 2019 9:01 am
by Silvio.Falconi
Otto wrote:Hello Silvio,
I have tried briefly with mod harbour, if you could realize such a calendar. I think it works.
I included the daypilot component in Genesis.

I know that does not help much with TCalex, but maybe you can start with mod harbor. I think that's easier.

I think we are in the same situation today as when Fivewin Clipper replaced.
Web programs are what WINDOWS used to be in DOS times.


Best regards,

Otto
for now I'm not interesting to use mod_harbour i must resolve some problems with oldest applications on windows system
probable I am a donkey and not I understood how it run

Re: TCalex: Show bad Mouth View

Posted: Thu Dec 12, 2019 11:56 am
by Silvio.Falconi
Making a small test I saw there is an error on tcalex class ( fwh package)

the date is wrong

Image





Please compile this small test

Code: Select all

#include "fivewin.ch"
#include "constant.ch"
#include "calex.ch"

Function test()
Local oDlg
Local oCalex

DEFINE DIALOG oDlg SIZE 600,600

DEFINE CALEX oCalex OF oDlg ;
          FIRST_DATE 0 ALL
Activate DIALOG oDlg
Return nil

Re: TCalex: Show bad Mouth View

Posted: Thu Dec 12, 2019 12:10 pm
by Silvio.Falconi
found the error
METHOD GetFirstDateWeek( dDate ) CLASS TCalEx

local dFirstDateWeek

DEFAULT dDate := ::dDateSelected

if ::Classname() != "TDAYVIEW"
// Si ponemos +2 empieza en lunes
dFirstDateWeek = dDate - DoW( dDate ) + 1 + _GFD
else
dFirstDateWeek = dDate
endif

RETURN dFirstDateWeek