Error on Editvars with FW 20.02 ?

Error on Editvars with FW 20.02 ?

Postby Marc Venken » Mon Apr 05, 2021 9:46 pm

Hello,

Can someone test if the funcion/command editvars is giving a error ?

Application
===========
Path and name: C:\fwharb\samples\testreport.exe (32 bits)
Size: 4,225,024 bytes
Compiler version: Harbour 3.2.0dev (r2008190002)
FiveWin version: FWH 21.02
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200

Time from start: 0 hours 0 mins 1 secs
Error occurred at: 04/05/21, 23:45:52
Error description: Error BASE/1100 Argument error: TRIM
Args:
[ 1] = B {|| ... }

Stack Calls
===========
Called from: => TRIM( 0 )
Called from: .\source\classes\DATAROW.PRG => TDATAROW:MAKEONEGET( 2148 )
Called from: .\source\classes\DATAROW.PRG => TDATAROW:PLACECONTROLS( 2034 )
Called from: .\source\classes\DATAROW.PRG => (b)TDATAROW_EDIT( 1924 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 864 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 1124 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
Called from: .\source\classes\DATAROW.PRG => TDATAROW:EDIT( 1932 )
Called from: .\source\function\MSGGET.PRG => MSGGETARRAY( 113 )
Called from: .\source\function\MSGGET.PRG => MSGGET( 14 )
Called from: testreport.prg => MAIN( 11 )

Sample from FW/samples. Only added editvars for testing a working program

Code: Select all  Expand view

#include "fivewin.ch"
#include "report.ch"

function Main()

   local oDlg, oBrw, oCn, oRs
   local cZoek

   cZoek:= "Test"
   msginfo(cZoek)
   editvars cZoek


   oCn   := FW_OpenAdoConnection( "xbrtest.mdb" )
   oRs   := FW_OpenRecordSet( oCn, "customer" )

   DEFINE DIALOG oDlg SIZE 500,300 PIXEL TRUEPIXEL

   @ 60,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE oRs COLUMNS "First", "City", "Age" ;
      CELL LINES NOBORDER

   oBrw:CreateFromCode()

   @ 20,20 BUTTON "REPORT" SIZE 80,30 PIXEL OF oDlg ;
      ACTION oBrw:Report( nil, nil, nil, { |oRep,brw| MyReportSetup( oRep, brw ) } )

   ACTIVATE DIALOG oDlg CENTERED

   oRs:Close()
   oCn:Close()

return nil

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

function MyReportSetup( oRep, oBrw )

   local oRs   := oBrw:oRs
   local cLines   := cValToChar( oBrw:nLen ) + " lines"

   COLUMN TITLE "First Name" DATA oRs:Fields( "First" ):Value SIZE 25
   COLUMN TITLE "Street"     DATA oRs:Fields( "Street" ):Value SIZE 25
   COLUMN TITLE "City"       DATA oBrw:City:Value SIZE 25
   COLUMN TITLE "Salary"     DATA oRs:Fields( "salary" ):Value PICTURE "999,999.99" TOTAL

   oRep:bPostEnd   := { || oRep:Say( 1, cLines ) }

return .t.

// return .t. means xbrowse should not add columns
//----------------------------------------------------------------------------//

 
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1434
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Error on Editvars with FW 20.02 ?

Postby nageswaragunupudi » Tue Apr 06, 2021 7:37 am

We will look into this.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10642
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Error on Editvars with FW 20.02 ?

Postby nageswaragunupudi » Wed Apr 07, 2021 3:22 am

We regret the inconvenience.

Kindly apply this fix to fwh\source\classes\datarow.prg:

Locate this code in Line No: 2148
Code: Select all  Expand view
nMaxLen  := Max( Len( Trim( aLine[ 2 ] ) ) + 30, Len( aLine[ 2 ] ) )


Please change this line as:
Code: Select all  Expand view
nMaxLen  := Max( Len( Trim( Eval( bGet ) ) ) + 30, Len( Eval( bGet ) ) )


Please let us know if this works.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10642
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Error on Editvars with FW 20.02 ?

Postby Marc Venken » Wed Apr 07, 2021 10:00 pm

This is working now.
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1434
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 49 guests