FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour error on xbrowse with array empty or error on declare an arr
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
error on xbrowse with array empty or error on declare an arr
Posted: Mon Aug 27, 2018 02:45 PM
I can have an array empty but the xbrowse give me error when I try to show it

aErroriNum:={}


this test give me error on this row

oBrowse1:aCols[2]:cHeader := i18n("Riga")

why ?




Code (fw): Select all Collapse
 

Function Controllo()
   Local aErroriNum:={}
   Local oDlgErrore
   Local oBrowse1

 DEFINE DIALOG oDlgErrore  SIZE 600,400  TRANSPARENT;
              TITLE "Configurazione Errata"

@ 30, 10 XBROWSE  oBrowse1 OF oDlgErrore ;
      SIZE 80,100 PIXEL NOBORDER

        oBrowse1:SetArray(aErroriNum)


      oBrowse1:aCols[1]:cHeader  := i18n("Col")
      oBrowse1:aCols[1]:nWidth   := 50
      oBrowse1:aCols[2]:cHeader  := i18n("Riga")
      oBrowse1:aCols[2]:nWidth   := 50

                     WITH OBJECT oBrowse1
                      :lHscroll            := .F.
                      :l2007               := .F.
                      :l2015               := .T.
                      :nStretchCol         := STRETCHCOL_WIDEST
                      :lAllowRowSizing     := .F.
                      :lAllowColSwapping   := .F.
                      :lAllowColHiding     := .F.
                      :lRecordSelector     := .F.
                      :CreateFromCode()
                   END

ACTIVATE DIALOG oDlgErrore CENTERED
return nil



I understood the array aErroriNum can be of one column and my test is bad but How correct it ?
I tried also with aErrorNum:)array(,) but it make error


I tried also with

@ 30, 10 XBROWSE oBrowse1 OF oDlgErrore ;
COLUMNS 1, 2 ;
HEADERS "Col","Riga" ;
COLSIZES 40, 40 ;
ARRAY aErroriNum ;
SIZE 80,100 PIXEL NOBORDER

it not make error but insert on header A B
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: error on xbrowse with array empty or error on declare an arr
Posted: Mon Aug 27, 2018 03:37 PM
@ 30, 10 XBROWSE oBrowse1 OF oDlgErrore ;
COLUMNS 1, 2 ;
HEADERS "Col","Riga" ;
COLSIZES 40, 40 ;
ARRAY aErroriNum ;
SIZE 80,100 PIXEL NOBORDER


This is the right way.


it not make error but insert on header A B

I do not understand what does this mean.
Please explain what is the problem.
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: error on xbrowse with array empty or error on declare an arr
Posted: Mon Aug 27, 2018 03:59 PM

sorry my mistake
now it seem to run ok

but also I have problem at this topic

viewtopic.php?f=3t=35980#p214315

&

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion