FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBrowse numbers and strings ... Resuelto
Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
XBrowse numbers and strings ... Resuelto
Posted: Mon Nov 10, 2014 02:01 PM
Colleagues, I have the following problem. In a table where concepts by those amounts of these concepts that are at zero replacement one by an empty string. This he did until version 12.04 without problems, with version 14.09 throws me this error.

Code (fw): Select all Collapse
===========
   Path and name: C:\cole_sql\colegio.EXE (32 bits)
   Size: 3,267,072 bytes
   Compiler version: Harbour 3.2.0dev (r1406271520)
   FiveWin  Version: FWH 14.09
   Windows version: 6.1, Build 7601 Service Pack 1

   Time from start: 0 hours 0 mins 4 secs 
   Error occurred at: 10/11/2014, 14:21:25
   Error description: Error BASE/2022  Error de argumento: ALLTRIM
   Args:
     [   1] = N   1465.00

Stack Calls
===========
   Called from:  => ALLTRIM( 0 )
   Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTCELL( 10322 )
   Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTDATA( 10258 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1556 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1367 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1699 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 12584 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3341 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1046 )
   Called from: C:\cole_sql\main.prg => START( 49 )
   Called from: C:\cole_sql\main.prg => MAIN( 12 )


Attached is a picture for clarity
http://imageshack.com/a/img540/9525/3F5tEW.jpg

Anyone have any idea ??? from already thank you very much.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBrowse numbers and strings ...
Posted: Mon Nov 10, 2014 04:57 PM
You might have defined bStrData directly in the program.
Though bStrData is expected to return a String your bStrData codeblock might be returning a Numeric value.

[ "b" = codeblock returing "Str'" = String data ]

In such a case the error in AllTrim() must have occurred in line 10318 but not at 10322, ( version 14.09 ) unless you modified source code of xbrowse.

Despite our advice not to define bStrData directly in the application and if defined, it should return String value, it is possible that legacy applications still remain unmodified. It seems we need to continue protecting such deviations for some more time.

Advice:
I am assuming you are using version 14.09
Please modify xbrowse.prg.
Please locate the following lines in method PaintCell()

Code (fw): Select all Collapse
   cData    := AllTrim( IfNil( ::StrData, "" ) )

Modify this line as:
Code (fw): Select all Collapse
   cData    := AllTrim( cValToChar( IfNil( ::StrData, "" ) ) )
Regards



G. N. Rao.

Hyderabad, India
Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: XBrowse numbers and strings ...
Posted: Mon Nov 10, 2014 06:54 PM

Mr. Rao, Thank you for responding. The line the error is correct, I have not modified the source. I'll try your suggestion. Thanks again.

regards

Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: XBrowse numbers and strings ...
Posted: Mon Nov 10, 2014 11:05 PM
Mr. Rao, I solved this problem as follows

Code (fw): Select all Collapse
oBrw : aCols[ 1 ] : cEditPicture := "@Z 999,999.99"


Thank you for your time

regards

Continue the discussion