Page 1 of 2

Tcalex problems

PostPosted: Mon Oct 16, 2017 5:26 pm
by Silvio.Falconi
Look the picture please

Image

If click on Day name then give me 24 september ... why ?

Re: Tcalex problems

PostPosted: Mon Oct 16, 2017 5:49 pm
by cnavarro
This method

Code: Select all  Expand view


GetDateFromPos( nAtRow, nAtCol ) INLINE ::dStart + ( ( nAtRow - 1 ) * 7 ) + nAtCol - 1

 


Select previous week

Change as

Code: Select all  Expand view


GetDateFromPos( nAtRow, nAtCol ) INLINE ::dStart + ( Max( nAtRow - 1, 0 ) * 7 ) + nAtCol - 1

 


and try

Re: Tcalex problems

PostPosted: Mon Oct 16, 2017 6:17 pm
by Silvio.Falconi
found it
run ok but not refresh and on first october I now see any appointment

Re: Tcalex problems

PostPosted: Mon Oct 16, 2017 6:21 pm
by cnavarro
Use Fivedit and use "search in files" :D :D :D

File TMonthV.prg

Re: Tcalex problems

PostPosted: Mon Oct 16, 2017 6:30 pm
by Silvio.Falconi
yes another error


Look the image

Image

Tcalex put the wrong days ?

today is 16 october and I am sure is monday

Re: Tcalex problems

PostPosted: Mon Oct 16, 2017 6:48 pm
by cnavarro
Please look TCalex.ch

Code: Select all  Expand view


#xcommand DEFINE CALEX <oCalex>;
          [ <of: OF, WINDOW, DIALOG, PANEL> <oWnd> ];
          [ FROM <nTop>, <nLeft> TO <nBottom>, <nRight> ];
          [ FIRST_DATE <nFirst> ];
          [ COLOR <nClrText> ];
          [ <cAdjust: ALL,TOP,LEFT,BOTTOM,RIGHT> ] ;

 


#xcommand DEFINE CALEX <oCalex>;
[ <of: OF, WINDOW, DIALOG, PANEL> <oWnd> ];
[ FROM <nTop>, <nLeft> TO <nBottom>, <nRight> ];
[ FIRST_DATE <nFirst> ]; // 7 for Sunday
[ COLOR <nClrText> ];
[ <cAdjust: ALL,TOP,LEFT,BOTTOM,RIGHT> ] ;


Re: Tcalex problems

PostPosted: Mon Oct 16, 2017 6:57 pm
by Silvio.Falconi
yes of course I set 7 but I sawthe sample01.prg ( it is wrong)

Re: Tcalex problems

PostPosted: Mon Oct 16, 2017 7:00 pm
by cnavarro
Silvio.Falconi wrote:yes of course I set 7 but I sawthe sample01.prg ( it is wrong)


Not, it is right
I've put it so they learn the use of the commands
There are other threads in the forum that talk about this topic

Re: Tcalex problems

PostPosted: Mon Oct 16, 2017 7:01 pm
by Silvio.Falconi
Cristobal,
can I change the Hours of afternoon ?
from 13.00 to 24,00 ?

Re: Tcalex problems

PostPosted: Mon Oct 16, 2017 7:01 pm
by cnavarro
Please change the title of the post with: "Doubts of TCalex" :D :D :D

Re: Tcalex problems

PostPosted: Tue Oct 17, 2017 7:44 am
by Silvio.Falconi
Cristobal,
No I'm sorry there are other many problems

One most

When You create an appointment then you cannot see it on Month or Week
Only if you close the application and recall the exe you can see it
this is not a doubt but it is a certainty

then you sad me to change this
GetDateFromPos( nAtRow, nAtCol ) INLINE ::dStart + ( Max( nAtRow - 1, 0 ) * 7 ) + nAtCol - 1
Not run here it not refresh then I cannot see any appointment

Where is the syncro with Google Calendar ? ...you promised me at fwh 17.07 package ?
I' waiting this ... syncro with google calendar function with FWH. How long be finish?

there are colors but I cannot change the color appoinment at sampleo1 there is funcrion color... it passed also a date but then not use it

I saw the version of fjhg, tcalex changed by fjhg, not tcalex changed by Daniel or Cristobal

then Iasked to print the week (graphic) I tried to make something and send tyo daniel I hoped he make it ...

Re: Tcalex problems

PostPosted: Tue Oct 17, 2017 9:27 am
by cnavarro
Silvio.Falconi wrote:Cristobal,

I saw the version of fjhg, tcalex changed by fjhg, not tcalex changed by Daniel or Cristobal



My minor changes and fix:

viewtopic.php?f=6&t=33740&start=0&hilit=tcalex
viewtopic.php?f=6&t=33947&p=200877&hilit=tcalex#p200828
viewtopic.php?f=6&t=33878&start=0&hilit=tcalex
and more: look forum

And, now TCalex is a control. You can place the control in the position you want. See the new clauses in the TCALEX command
I will not justify my work. Does that mean it's not true?

When You create an appointment then you cannot see it on Month or Week
Only if you close the application and recall the exe you can see it
this is not a doubt but it is a certainty


Sample run OK.
Delete and create your databases and index
No other users have reported any problems with this theme

GetDateFromPos( nAtRow, nAtCol ) INLINE ::dStart + ( Max( nAtRow - 1, 0 ) * 7 ) + nAtCol - 1


This is for double click over name day: ¿ what has to do with the issue of being able to see the appointments?
Solution: Do not change it and double click say day of week previous

there are colors but I cannot change the color appoinment at sampleo1 there is funcrion color... it passed also a date but then not use it


See Method ColorStatus (nType, dDate) CLASS SampleCalex
I recommend that you study the class as we have done the others

Where is the syncro with Google Calendar ? ...you promised me at fwh 17.07 package ?


I repeat my words from Austria:
The question was: can I synchronize TGoogle's calendar with TCalex?
My answer
"TCalendar returns an array with appointments from the google calendar. You can easily adapt this array to save it to the TCalex DBF"
And the ability to develop for any of those present in the conversation that function in the future was raised

I' waiting this ... syncro with google calendar function with FWH. How long be finish?


This class is finished. Users who have been interested in these classes, have contacted me and have had the opportunity to try them out.
One sample:
viewtopic.php?f=3&t=34326#p206141

TCalex, run OK for me
Topic closed for me

Re: Tcalex problems

PostPosted: Tue Oct 17, 2017 9:38 am
by Silvio.Falconi
Topic closed for me ?????????????????????????????????????????????????????????


ColorStatus (nType, dDate)

Code: Select all  Expand view
Function ColorStatus( nType, dFecha )

   local aGrad
   local nClrT     := CLR_BLACK
   DEFAULT nType   := 0

   DO CASE
      case nType = 1
         aGrad := { { 1, RGB(0x9a,0xcd,0x32), RGB(0x9a,0xcd,0x32) } }
         nClrT     := CLR_BLACK
      case nType = 2
         aGrad := { { 1, RGB(0x00,0x80,0xff) , RGB(0x00,0x80,0xff) } }
         nClrT     := CLR_BLACK
      case nType = 3
         aGrad := { { 1, RGB(0xff,0xff,0x80), RGB(0xff,0xff,0x80) } }
         nClrT     := CLR_BLACK
      case nType = 4
         aGrad := { { 1, RGB(0xff,0x00,0x00), RGB(0xff,0x00,0x00) } }
         nClrT := CLR_WHITE
      case nType = 5
         aGrad := { { 1, RGB(0xc0,0xc0,0xc0), RGB(0xc0,0xc0,0xc0) } }
         nClrT     := CLR_BLACK
      case nType = 6
         aGrad := { { 1, METRO_ORANGE, METRO_ORANGE } }
         nClrT     := CLR_BLACK
      case nType = 7
         aGrad := { { 1, METRO_LIME, METRO_LIME } }
         nClrT     := CLR_BLACK
      case nType = 8
         aGrad := { { 1, METRO_CRIMSON, METRO_CRIMSON } }
         nClrT     := CLR_BLACK
      case nType = 9
         aGrad := { { 1, METRO_OLIVE, METRO_OLIVE } }
         nClrT     := CLR_BLACK
      case nType = 10
         aGrad := { { 1, METRO_STEEL, METRO_STEEL } }
         nClrT     := CLR_BLUE
      Otherwise
         aGrad := { { 1, RGB(0x9a,0xcd,0x32), RGB(0x9a,0xcd,0x32) } }
  ENDCASE

return { aGrad, nClrT }
 



or

METHOD ColorStatus( nType, dFecha ) CLASS SampleCalex


Code: Select all  Expand view
METHOD ColorStatus( nType, dFecha ) CLASS SampleCalex

   local aGrad
   local nClrT     := CLR_BLACK
   DEFAULT nType   := 0

   DO CASE
      case nType = 1
         aGrad := { { 1, RGB(0x9a,0xcd,0x32), RGB(0x9a,0xcd,0x32) } }
         nClrT     := CLR_BLACK
      case nType = 2
         aGrad := { { 1, RGB(0x00,0x80,0xff) , RGB(0x00,0x80,0xff) } }
         nClrT     := CLR_BLACK
      case nType = 3
         aGrad := { { 1, RGB(0xff,0xff,0x80), RGB(0xff,0xff,0x80) } }
         nClrT     := CLR_BLACK
      case nType = 4
         aGrad := { { 1, RGB(0xff,0x00,0x00), RGB(0xff,0x00,0x00) } }
         nClrT := CLR_WHITE
      case nType = 5
         aGrad := { { 1, RGB(0xc0,0xc0,0xc0), RGB(0xc0,0xc0,0xc0) } }
         nClrT     := CLR_BLACK
      case nType = 6
         aGrad := { { 1, METRO_ORANGE, METRO_ORANGE } }
         nClrT     := CLR_BLACK
      case nType = 7
         aGrad := { { 1, METRO_LIME, METRO_LIME } }
         nClrT     := CLR_BLACK
      case nType = 8
         aGrad := { { 1, METRO_CRIMSON, METRO_CRIMSON } }
         nClrT     := CLR_BLACK
      case nType = 9
         aGrad := { { 1, METRO_OLIVE, METRO_OLIVE } }
         nClrT     := CLR_BLACK
      case nType = 10
         aGrad := { { 1, METRO_STEEL, METRO_STEEL } }
         nClrT     := CLR_BLUE
      Otherwise
         aGrad := { { 1, RGB(0x9a,0xcd,0x32), RGB(0x9a,0xcd,0x32) } }
  ENDCASE

return { aGrad, nClrT }




both the function and the method use the variable dfecha but yeah in the script that variable is not used and compiling with harbor makes me error on compilation while in xharbour the compile goes ok

Re: Tcalex problems

PostPosted: Tue Oct 17, 2017 9:52 am
by cnavarro
Use Method, not function
Function is used for other function added ( apopupbrowse ), it's a sample

Re: Tcalex problems

PostPosted: Wed Oct 18, 2017 9:41 am
by Silvio.Falconi
it' is possible make a report for a only week (that activate) ?
as you can make at google calendar or another software ?