error with xbrowse

error with xbrowse

Postby Silvio.Falconi » Wed Dec 26, 2018 6:14 pm

give me error on text bold

@ 45, 40 XBROWSE oBrw1 SIZE 400,-65 PIXEL OF oDlg ;
COLUMNS 5,2,4,7,8,9,12,11;
HEADERS "Tipo","Descrizione","Costo","Disp.","A4", "Pos", "Ord.","";
COLSIZES 40,110,50,50,28,28,30,34 ;
CELL LINES NOBORDER ;
DATASOURCE "oServiziSingoli"

WITH OBJECT oBrw1
:nRowHeight := 30
WITH OBJECT oBrw1:aCols[ 1]
:lBmpStretch := .F.
:lBmpTransparent := .T.
:nwidth := 40
:bStrImage := {|| oServiziSingoli:IMAGE }
END
end

oBrw1:CreateFromCode()
oBrw1:cAlias := oServiziSingoli:cAlias


the error
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... } length: 0
[ 2] = N 1
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: error with xbrowse

Postby nageswaragunupudi » Thu Dec 27, 2018 3:44 am

There is no alias by name "oServiziSingoli". How do you think it works?

If oServiziSingoli:cAlias is a valid alias, then change as
Code: Select all  Expand view

DATASOURCE oServiziSingoli:cAlias
 


If oServiziSingoli is a valid TDatabase object
Code: Select all  Expand view

DATASOURCE oServiziSingoli
 


In the columns clause please give field names.
Regards

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

Re: error with xbrowse

Postby Silvio.Falconi » Fri Dec 28, 2018 1:53 am

same errors
I'm trying with tdata lib

Code: Select all  Expand view
 
 oServiziSingoli:= TServizi():new()
   oServiziSingoli:setFilter( "multiple == .f.")
   oServiziSingoli:gotop()

@ 45, 40 XBROWSE oBrw1 SIZE 400,-65 PIXEL OF oDlg  ;
     COLUMNS 5,2,4,7,8,9,12,11;
     HEADERS "Tipo","Descrizione","Costo","Disp.","A4", "Pos", "Ord.","";
     COLSIZES 40,110,50,50,28,28,30,34 ;
     CELL LINES NOBORDER;
     DATASOURCE "oServiziSingoli:cAlias"

                WITH OBJECT oBrw1
                  :nRowHeight    := 30
                      WITH OBJECT oBrw1:aCols[ 1]
                             :lBmpStretch     := .F.
                             :lBmpTransparent := .T.
                             :nwidth := 40
                             :bStrImage       := {|| oServiziSingoli:IMAGE }
                          END
                        WITH OBJECT oBrw1:aCols[ 5]
                             :AddBitmap({ "CHECK2" ,"CHECK3"})
                             :bBmpData := { || iif( oServiziSingoli:a4, 1, 2) }
                             :bStrData := { || "" }
                         END
                         WITH OBJECT oBrw1:aCols[ 6]
                             :AddBitmap({ "CHECK2" ,"CHECK3"})
                             :bBmpData := { || iif( oServiziSingoli:pos, 1, 2) }
                             :bStrData := { || "" }
                         END
                         WITH OBJECT oBrw1:aCols[ 8]
                             :AddBitmap({ "LOCK" ,"LOCK_OPEN"})
                             :bBmpData := { || iif( oServiziSingoli:ISlock, 1, 2) }
                             :bStrData := { || "" }
                         END
                      :lHscroll            := .F.
                      :l2007               := .F.
                      :l2015               := .T.
                      :lRecordSelector     := .f.
                      :nStretchCol         := STRETCHCOL_WIDEST
                      :lAllowRowSizing     := .F.
                      :lAllowColSwapping   := .F.
                      :lAllowColHiding     := .F.
                      :nMarqueeStyle       := MARQSTYLE_HIGHLWIN7
                      :cAlias := oServiziSingoli:cAlias
                      :CreateFromCode()
                 END

 


Also James Bott not resolved
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: error with xbrowse

Postby nageswaragunupudi » Fri Dec 28, 2018 2:29 am

Why do you put this in quotes?
Code: Select all  Expand view

"oServiziSingoli:cAlias"
 

Remove the quotes

Code: Select all  Expand view

DATASOURCE oServiziSingoli:cAlias
//OR
DATASOURCE oServiziSingoli
 
Regards

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

Re: error with xbrowse

Postby James Bott » Fri Dec 28, 2018 2:56 am

Silvio,

I did send you a working copy. Did you not get it?

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 38 guests