FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TXBrowse nAt() and nColSel
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
TXBrowse nAt() and nColSel
Posted: Mon Jan 14, 2008 12:19 AM

Mr Antonio

In one of the recent revisions of TXBrowse, the new method nAt was introduced.

Under what circumstances oBrw:nAt() and oBrw:nColSel give different values?

Method nAt returns ::ColPos( ::SelectedCol() )
Method SelectedCol() returns ::ColAtPos( ::nColSel ) and in turn ColAtPos( ::nColSel ) returns ::aDisplay[ ::nColSel ]
Therefore SelectedCol() returns ::aDisplay[ ::nColSel ]
Method ColPos( ::SelectedCol() ) appears to be equivalent to ColPos( ::aDisplay[ ::nColSel ] ) returning the position in ::aDisplay, which is again ::nColSel.

From the above it appears that oBrw:nAt() always returns ::nColSel. If so where is the need for the method nAt() ?

If the intention is to have naming compatibility with TWBrowse and TCBrowse, nAt should have been named nColAct(). This helps easy migration from TWBrowse or TCBrowse to TXBrowse.

Do I miss something?

Regards



G. N. Rao.

Hyderabad, India
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
TXBrowse nAt() and nColSel
Posted: Mon Jan 14, 2008 06:48 AM

NageswaraRao,

nAt() was intruduced in October 2007 with the purpose to know the current array selected element, not to query a selected column, even if they provide the same value.

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion