FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Latest xHarbour from CVS requires FWH PRGs recompile
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Sun Oct 26, 2008 06:01 PM

As subject.

EMG

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Sun Oct 26, 2008 06:30 PM

Sorry, it is not enough. Latest xHarbour from CVS isn't currently usable.

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Sun Oct 26, 2008 07:50 PM

Enrico,

We have not tested it yet.

The latest xharbour build that we provided with FWH 8.10 works very well and we are also quite busy working on the Visual IDE :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Mon Oct 27, 2008 09:12 AM
Antonio,

there is still the problem with the TDatePicker class using the latest xHarbour you publish.

http://forums.fivetechsoft.com/viewtopic.php?t=13202

Did you have a solution yet ?
kind regards

Stefan
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Mon Oct 27, 2008 09:24 AM

Stefan,

fwh\samples\DateTime.prg works fine with Harbour (you can check on and off the controls), but GPFs with xHarbour when the checkbox is turned off. So it looks as a xHarbour issue.

Anyhow we are going to review it,

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Mon Oct 27, 2008 09:35 AM

Stefan,

It looks as the problem comes from hb_retds()

If we change this line in Class TDatePick:

METHOD GetDate() INLINE Date() // GetDatePick( ::hWnd )

Then fwh\samples\DateTime.prg works fine with xHarbour.

Lets compare Harbour and xHarbour hb_retds()...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Mon Oct 27, 2008 10:42 AM
Stefan,

With this change in source\winapi\datepick.c GETDATEPICK() function, there are no longer GPFs:
   st.wYear = 0; st.wMonth = 0; st.wDay = 0;   
   SendMessage( ( HWND ) _parnl( 1 ), DTM_GETSYSTEMTIME, 0, ( LPARAM ) &st );
   ...

Anyhow, with Harbour we get an empty date when the checkbox is unselected, and with xHarbour we get the date.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Mon Oct 27, 2008 10:54 AM
Stefan,

Ok, with this change the bug is solved:
METHOD Notify( nIdCtrl, nPtrNMHDR ) CLASS TDatePick

   local nCode := GetNMHDRCode( nPtrNMHDR )
   
   if nCode == -759  // Date-time picker changed
      SysRefresh()  // here !!!
      Eval( ::bSetGet, ::GetDate() )
      ::Change()
   endif
   
return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Tue Oct 28, 2008 12:17 PM

Antonio,

many thanks for your help, but your solution does not work here. The sample is still crashing using an empty date or unselecting the checkbox :(

It seems, the sample stops working in the function sendmessage (...)

kind regards

Stefan
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Tue Oct 28, 2008 12:32 PM

Stefan,

Please test our EXE built using FWH 8.10 (with the commented changes) and xHarbour:

http://rapidshare.com/files/158327955/datetime.zip.html

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Tue Oct 28, 2008 03:27 PM
Antonio,

your exe works fine.

here is the error screen I get executing my exe

kind regards

Stefan
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Tue Oct 28, 2008 05:36 PM
Stefan,

This is the DateTime.prg that I am using:
// Date picker and Time picker samples

#include "FiveWin.ch"
#include "dtpicker.ch"

//----------------------------------------------------------------------------//

function Main()

   local oDlg, aGet[5], aVAR[5], aSAY[5]

   Set Date British
   
   DEFINE DIALOG oDlg RESOURCE "Main"

   aVAR[1] := Date()
   REDEFINE DTPicker aGet[1] VAR aVAR[1] ID 120 UPDATE OF oDlg
   REDEFINE SAY aSAY[1] ID 130 UPDATE OF oDlg

   aVAR[2] := Date()
   REDEFINE DTPicker aGet[2] VAR aVAR[2] ID 121 UPDATE OF oDlg
   REDEFINE SAY aSAY[2] ID 131 UPDATE OF oDlg

   aVAR[3] := ctod('')
   REDEFINE DTPicker aGet[3] VAR aVAR[3] ID 122 UPDATE OF oDlg
   REDEFINE SAY aSAY[3] ID 132 UPDATE OF oDlg

   aVAR[4] := Hora()
   REDEFINE TMPicker aGet[4] VAR aVAR[4] ID 123 UPDATE OF oDlg 
   REDEFINE SAY aSAY[4] ID 133 UPDATE OF oDlg

   aVAR[5] := ''
   REDEFINE TMPicker aGet[5] VAR aVAR[5] ID 124 UPDATE OF oDlg 
   REDEFINE SAY aSAY[5] ID 134 UPDATE OF oDlg

   REDEFINE BUTTON ID IDOK OF oDlg ACTION ps_Show(aGet, aSAY)
   REDEFINE BUTTON ID 4 OF oDlg ACTION ps_Clean(aSAY)
   REDEFINE BUTTON ID IDCANCEL OF oDlg ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED

return nil

static proc ps_Show(aGet, aSAY)
   local i, xValor

   for i:= 1 to len(aGet)
     xValor := Eval(aGet[i]:bSetGet)
     xValor := if( Empty(xValor), 'EMPTY', xValor )
     xValor := if( Valtype(xValor)='D', dtoc(xValor), xValor )
     aSAY[i]:SetText( xValor )
   next
return

static proc ps_Clean(aSAY)
   local i, xValor

   for i:= 1 to len(aSAY)
     aSAY[i]:SetText( '' )
   next
return

FUNCTION Hora()

  local nAux, nMin, nHor, nSec, cMin, cHor, cSec
  nSec := Seconds()
  nAux := Int(nSec) / 3600
  nHor := Int(nAux)
  nAux := (nAux - nHor) * 60
  nMin := Int(nAux)
  nSec := Int( (nAux - nMin) * 60 )
  cHor := Padl( alltrim(str(nHor)), 2, '0')
  cMin := Padl( alltrim(str(nMin)), 2, '0')
  cSec := Padl( alltrim(str(nSec)), 2, '0')

return cHor + cMin + cSec

No changes in the RC file.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Wed Oct 29, 2008 08:34 AM

Antonio,

same as mine.

It fails at aVAR[3] := ctod('') .
It shows the actual date and crashes unselecting the checkbox.

The timepicker is working fine.

kind regards

Stefan
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Wed Oct 29, 2008 10:00 AM

Stefan,

What FWH and xHarbour versions are you using ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Latest xHarbour from CVS requires FWH PRGs recompile
Posted: Wed Oct 29, 2008 10:41 AM
Antonio,

finally I found what´s going wrong here. :-)

The changed file datepick.c was not correct compiled, so the old datepick.obj from the lib was not replaced by the new one.

I don´t know why, but the directive CLIPPER is not translated, even changing this to HARBOUR does not work. So in the obj file the function name is GETDATEPICK and not _HB_FUN_GETDATEPICK.

If I replace the function declaration as follows, all is working, except that the empty date is active
#ifdef __HARBOUR__
   HB_FUNC (GETDATEPICK) //( PARAMS ) // ( hWnd ) --> dDate
#else
   CLIPPER GETDATEPIC( PARAMS )
#endif


This change in tDtPicker.prg corrects the ´empty date´problem at the beginning.
METHOD SetDate( dDate, lEmpty ) INLINE IIF (Empty(dDate),(lEmpty :=.t., dDate:=Date()), ),;
                                          SetDatePick( ::hWnd, Year( dDate ),;
                                                       Month( dDate ), Day( dDate ),;
                                          If( lEmpty != nil .and. lEmpty, 1, 0 ) )



Do you have an idea, why the CLIPPER directive is not translated ?

Many thanks again for great help.

BTW, fwh is 7.09 and the latest xHarbour you publish
kind regards

Stefan