XBrowse and add column
Posted: Sat May 24, 2008 3:46 pm
Hi to all,
I doing some tests about xbrowse to evaluate a migration from the "old" tcbrowse and I did find a problem using the ADD COLUMN command that generate an error.
This is a self-contained code that show the problem:
#include "FiveWin.ch"
#include "xbrowse.ch"
function Main()
aNames:={}
aadd(aNames,{1,"Marc","4th Floor","Queens House"})
aadd(aNames,{2,"Marc","4th Floor","Queens House"})
aadd(aNames,{3,"Marc","4th Floor","Queens House"})
aadd(aNames,{4,"Marc","4th Floor","Queens House"})
DEFINE dialog OWND TITLE "xBrowse tests" FROM 5,5 TO 40,80
@1,1 XBROWSE oBrw ARRAY aNames
ADD COLUMN TO oBrw DATA ARRAY ELEM 1
ADD COLUMN TO oBrw DATA ARRAY ELEM 2
ACTIVATE dialog OWND
I think the problem is into the xbrowse.ch that translate the command using the tcbrowse functions instead of the new xbrowse function.
Is there any solution ?
I need to manage single "ADD COLUMN"
so I can't assign the columns immediatly when I call the XBROWSE command.
I doing some tests about xbrowse to evaluate a migration from the "old" tcbrowse and I did find a problem using the ADD COLUMN command that generate an error.
This is a self-contained code that show the problem:
#include "FiveWin.ch"
#include "xbrowse.ch"
function Main()
aNames:={}
aadd(aNames,{1,"Marc","4th Floor","Queens House"})
aadd(aNames,{2,"Marc","4th Floor","Queens House"})
aadd(aNames,{3,"Marc","4th Floor","Queens House"})
aadd(aNames,{4,"Marc","4th Floor","Queens House"})
DEFINE dialog OWND TITLE "xBrowse tests" FROM 5,5 TO 40,80
@1,1 XBROWSE oBrw ARRAY aNames
ADD COLUMN TO oBrw DATA ARRAY ELEM 1
ADD COLUMN TO oBrw DATA ARRAY ELEM 2
ACTIVATE dialog OWND
I think the problem is into the xbrowse.ch that translate the command using the tcbrowse functions instead of the new xbrowse function.
Is there any solution ?
I need to manage single "ADD COLUMN"
so I can't assign the columns immediatly when I call the XBROWSE command.