Error BASE/1132 Bound error: array access

Error BASE/1132 Bound error: array access

Postby EASYSOFT » Fri Feb 10, 2006 3:39 am

Hola amigos del foro

Este error lo tengo al pasar el mouse por sobre un browse (tcbrowse), cuando lo tengo sobre el dialogo no pasa nada.

Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... }
[ 2] = N 3

Stack Calls
===========
Called from TWINDOW:MOUSEMOVE(0)
Called from TWINDOW:HANDLEEVENT(0)
Called from TWINDOW:HANDLEEVENT(0)
Called from _FWH(0)
Called from DIALOGBOXINDIRECT(0)
Called from TDIALOG:ACTIVATE(0)
Called from FACTURA(92)
Called from (b)MIC5MENU(137)
Called from TC5MENU:COMMAND(714)
Called from TWINDOW:COMMAND(0)
Called from TWINDOW:HANDLEEVENT(0)
Called from _FWH(0)
Called from WINRUN(0)
Called from TWINDOW:ACTIVATE(0)
Called from MAIN(65)

Saludos

Oscar
Saludos
Oscar
Fwh 10.4, bcc55
EASYSOFT
 
Posts: 180
Joined: Sat Oct 22, 2005 1:17 pm
Location: Quito - Ecuador

Postby Antonio Linares » Fri Feb 10, 2006 9:11 am

Oscar,

Cuantas columnas tiene el TCBrowse ? Puedes mostrar aqui el código con el que creas el browse ? gracias
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby EASYSOFT » Fri Feb 10, 2006 12:16 pm

Es el código

// Reviewing arrays - using FiveWin TCBrowse

#include "FiveWin.ch"
#include "TCBrowse.ch"

//----------------------------------------------------------------------------//

static oBrw

//----------------------------------------------------------------------------//


Function factura(oWnd)
memvar inbod
local nI, aTestData, uVar, oBtn, oFont
local oWndChild, odfactu, oBar, oMsg
local cName := "Testing..."
local canum

CursorWait()

// load some fields into a multi element array,
dbselectarea("kardex")
canum := ' 74'
if !dbseek(inbod+'S'+canum)
?? inbod+'S'+canum
endif
aTestData := array(5,4) // Array( LastRec(), 4 ) // make the array
nI = 1
do while !eof() .and. inbod+'S'+canum = in_bod+in_tran+in_num
aTestData[nI,1] := PADR(Field->in_cod) // numb
dbselectarea("bodega")
if dbseek('01'+aTestData[nI,1])
descri := in_dsc
endif
dbselectarea("kardex")
aTestData[nI,2] := Trim(descri)
// need to pad char array element for editing beyond last character
aTestData[nI,3] := Field->in_klsomts // logical
aTestData[nI,4] := Field->in_vlrtota // date
ni++
dbskip()
enddo
* USE
* Aadd( atestdata, {"","","",0} )

DEFINE DIALOG odfactu FROM 2,2 TO 24, 85 OF oWnd TITLE "Test Multi Col Array"

@ 1.5, 3 COLUMN BROWSE oBrw OF odfactu ;
SIZE 170, 145 MESSAGE "Multi-Element Array Column Browse"

oBrw:SetArray( aTestData )
oBrw:Refresh()
oBrw:lHitBottom:= .f.
* oBrw:GoBottom()
SysRefresh()

oBrw:nClrForeHead := CLR_WHITE
oBrw:nClrBackHead := CLR_BLUE

// oBrw:bLDblClick = { | nRow, nCol | EditCell( oBrw, nRow, nCol ) }
// oBrw:lNoLiteBar := .t. // get rid of the lite bar cursor
// oBrw:lNoGrayBar := .t. // get rid of that ugly gray bar on lost focus
// oBrw:lMChange := .t. // set false to prevent Mouse colm resize/drag

oBrw:lLogicDrop := .t. // use crazy logic dropbox
oBrw:lNoHScroll := .t. // don't use that pesky horiz scroll bar
oBrw:nAdjColumn := 3 // expand this column to flush table right
oBrw:nFreeze := 5 // This will freeze all & prevent horiz scrolling
// NOTE can't resize/drag on frozen columns

ADD COLUMN TO BROWSE oBrw DATA oBrw:nAt ;
SIZE 30 NOBAR CENTER COLOR CLR_BLACK, CLR_HGRAY ;
HEADER "No"

ADD COLUMN TO oBrw DATA ARRAY ELEM 3 ;
HEADER "C¢digo " SIZE 60 RIGHT

* ADD TO oBrw ARRAY ELM 2 ;
* HEADER " Nombres" EDIT MESSAGE "Apellidos y Nombres" ;
* SIZE 10 PICTURE "" // size is small since will nAdjColumn width

* ADD COLUMN TO oBrw DATA ARRAY ELEM 2 ;
* HEADER "Descrupci¢n" EDIT SIZE 10 PICTURE "@S50"

* ADD COLUMN TO oBrw DATA ARRAY ELEM 3 ;
* HEADER "Cantidad " SIZE 60 RIGHT ;
* EDITABLE

ACTIVATE DIALOG odfactu

Saludos
Oscar
Saludos
Oscar
Fwh 10.4, bcc55
EASYSOFT
 
Posts: 180
Joined: Sat Oct 22, 2005 1:17 pm
Location: Quito - Ecuador

Postby EASYSOFT » Fri Feb 10, 2006 2:48 pm

Listo Antonio lo solucione

definia caracteristicas para columnas que no tenía en el browse

Gracias


Saludos

Oscar
Saludos
Oscar
Fwh 10.4, bcc55
EASYSOFT
 
Posts: 180
Joined: Sat Oct 22, 2005 1:17 pm
Location: Quito - Ecuador

Postby Antonio Linares » Fri Feb 10, 2006 7:18 pm

Oscar,

bien :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 49 guests