FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBROWSE FWH1305 : error in SetColFromRDD
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
XBROWSE FWH1305 : error in SetColFromRDD
Posted: Mon Jun 24, 2013 07:25 AM

Hello ,

Building xbrowse as :

@ 0,0 XBROWSE oBrw OF oWndChild ;
ALIAS cAlias ;
COLUMNS aCols;
......

Where acols are codeblock's

1) gives a error at 8371 :

if oCol:cDataType $ "+="
oCol:lReadOnly := .t.
endif

oCol:cDatatype is not defined (nil)

It seems that this lines were added (not present in fwh1304)

2) oCol:nDatalen and oCol:nDataDec are not assigned
Frank

test
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE FWH1305 : error in SetColFromRDD
Posted: Mon Jun 24, 2013 09:18 AM
Please modify the line as:
Code (fw): Select all Collapse
if oCol:cDataType != nil .and. oCol:cDataType $ "+="


Fixed for the next release.
Regards



G. N. Rao.

Hyderabad, India
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: XBROWSE FWH1305 : error in SetColFromRDD
Posted: Mon Jun 24, 2013 09:27 AM
nageswaragunupudi wrote:Please modify the line as:
Code (fw): Select all Collapse
if oCol:cDataType != nil .and. oCol:cDataType $ "+="


Fixed for the next release.



With this solution oCol:cDatatype remains nil , maybe :

if Empty( oCol:bEditValue )
..... // :ndatatype assigned
ELSE
oCol:cDataType := ValType( EVAL(oCol:bEditValue) )
ENDIF

Frank
test
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE FWH1305 : error in SetColFromRDD
Posted: Mon Jun 24, 2013 10:02 AM
If oCol:cDataType is nil, the column's Adjust() method assigns
::cDataType := ValType( Eval( ::bEditValue ) ).

I shall give here the actual fix adopted:
Please see the code from line 8362 to 8371
The existing code is reproduced below:
Code (fw): Select all Collapse
            otherwise
               :cDataType     := ValType( FieldGet( nFldPos ) )
            endcase
         END
      endif
   endif

   if oCol:cDataType $ "+="
      oCol:lReadOnly    := .t.
   endif


Fixed code:
Code (fw): Select all Collapse
            otherwise
               :cDataType     := ValType( FieldGet( nFldPos ) )
            endcase
         END
         if oCol:cDataType $ "+="
            oCol:lReadOnly    := .t.
         endif

      endif
   endif
/*
   if oCol:cDataType $ "+="
      oCol:lReadOnly    := .t.
   endif
*/
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion