XBROWSE : Method oCol(cHeader)

XBROWSE : Method oCol(cHeader)

Postby Demont Brecht » 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
Demont Brecht
 
Posts: 55
Joined: Fri Jul 08, 2011 6:43 am

Re: XBROWSE : Method oCol(cHeader)

Postby nageswaragunupudi » Sat Mar 10, 2012 11:32 pm

TXBrwColumn has overloaded operator "==", to make internal coding easy.
As for as the user is concerned:
oBrw:oCol( cHeader ) --> Column object having cHeader as its Header
oBrw:oCol( nCreationOrder ) --> Column object whose creation order is nCreationOrder.
oBrw:oCol( oCol ) --> same column.
Regards

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 78 guests