The below works as required; however, when aData is an empty array it comes up with 1132 Error, Bound error:array access. This doesn't happen with the 16-bit FW27. Advice would be appreciated as to how this is dealt with using FWH
Thanks
// Browsing a two dimensions array with FiveWin powerfull TWBrowse
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg, oBrw
local aData := { { "1", "Cliente", "=", "123456" },;
{ "2", "Direccion", "$", "Spain" },;
{ "3", "Telefono", "<>", "889977665" } }
SET _3DLOOK ON
DEFINE DIALOG oDlg FROM 2, 2 TO 20, 50
@ 1, 1 LISTBOX oBrw FIELDS aData[ oBrw:nAt ][ 1 ],;
aData[ oBrw:nAt ][ 2 ],;
aData[ oBrw:nAt ][ 3 ],;
aData[ oBrw:nAt ][ 4 ] OF oDlg ;
SIZE 150, 100 HEADERS "One", "Two", "Three", "Four"
oBrw:SetArray( aData )
@ 10, 9 BUTTON "&End" OF oDlg ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------------------------//