Latest xHarbour from CVS requires FWH PRGs recompile


Re: Latest xHarbour from CVS requires FWH PRGs recompile

Postby Enrico Maria Giordano » Sun Oct 26, 2008 6:30 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Sun Oct 26, 2008 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby StefanHaupt » Mon Oct 27, 2008 9: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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Antonio Linares » Mon Oct 27, 2008 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Mon Oct 27, 2008 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Mon Oct 27, 2008 10:42 am

Stefan,

With this change in source\winapi\datepick.c GETDATEPICK() function, there are no longer GPFs:
Code: Select all  Expand view
   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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Mon Oct 27, 2008 10:54 am

Stefan,

Ok, with this change the bug is solved:
Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby StefanHaupt » 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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby StefanHaupt » Tue Oct 28, 2008 3:27 pm

Antonio,

your exe works fine.

here is the error screen I get executing my exe

Image
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Antonio Linares » Tue Oct 28, 2008 5:36 pm

Stefan,

This is the DateTime.prg that I am using:
Code: Select all  Expand view
// 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby StefanHaupt » Wed Oct 29, 2008 8: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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Antonio Linares » Wed Oct 29, 2008 10:00 am

Stefan,

What FWH and xHarbour versions are you using ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby StefanHaupt » Wed Oct 29, 2008 10:41 am

Antonio,

finally I found what´s going wrong here. :D

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
Code: Select all  Expand view
#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.
Code: Select all  Expand view
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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 77 guests