XBROWSE : Method oCol(cHeader)
Posted: Sat Mar 10, 2012 8:55 am
Hello ,
Looking in the source from xbrowse , i see :
METHOD oCol( u ) CLASS TXBrowse
local nAt := AScan( ::aCols, { |o| o == u } )
Calling this method , u will be a character expression , so we have left from == a column object , right a character expression.
I tryed with oBrw:aCols[1]=="First" (column header) , and indeed this works and gives .T.
Trying the same with another object ( oBrw=="First") , gives as expected an error , also when data cExpr is added to the browse.
Why this sort of compare is possible with a column object , not with others ?
Frank
Looking in the source from xbrowse , i see :
METHOD oCol( u ) CLASS TXBrowse
local nAt := AScan( ::aCols, { |o| o == u } )
Calling this method , u will be a character expression , so we have left from == a column object , right a character expression.
I tryed with oBrw:aCols[1]=="First" (column header) , and indeed this works and gives .T.
Trying the same with another object ( oBrw=="First") , gives as expected an error , also when data cExpr is added to the browse.
Why this sort of compare is possible with a column object , not with others ?
Frank