Página 1 de 1

bound error: array acess

Enviado: 24 Jun 2024 18:36
por JoséQuintas
Tentando decifrar mas tá difícil
Array vazio {}, tentando pegar elemento 1

Código: Selecionar todos

Error BASE/1132  Bound error: array access  
Called from _ISWINDOWDEFINED(0)  
Called from _DEFINEMODALWINDOW(0)  
Called from GUI_DIALOGCREATE(333) 
Deve ser aqui

Código: Selecionar todos

      i := _GetNameList ( mVar )
      IF i == 0
         RETURN .F.
      ENDIF
      RETURN ( .NOT. ( _HMG_aFormDeleted [ i ] ) )
que vém pra cá:

Código: Selecionar todos

FUNCTION _GetNameList( x ) ;; RETURN _SetGetNamesList( x )
que vém pra cá:

Código: Selecionar todos

FUNCTION _SetGetNamesList( cName, nIndex, lDelete )
   STATIC _HMG_NAMESLIST
   IF HB_ISNIL( _HMG_NAMESLIST )
      _HMG_NAMESLIST := oHmgData()
   ENDIF
   IF PCount() == 1
      RETURN _HMG_NAMESLIST:Get( cName, 0 )
que vém pra cá:

Código: Selecionar todos

FUNCTION oHmgData( lUpper ) ;; RETURN THmgData():New( hb_defaultValue( lUpper, .T. ) )
que vém pra cá:

Código: Selecionar todos

CLASS THmgData
...
METHOD Get( xKey, xDef, lJson ) CLASS THmgData
   LOCAL x

   IF xKey == NIL
      RETURN ::a_a_Key
   ELSEIF HB_ISLOGICAL( xKey ) .or. xKey == NIL
      DEFAULT xDef := xKey
      RETURN ::Json( ::a_a_Key, xDef )
   ENDIF

   IF !Empty(lJson) .and. ::Pos( xKey ) > 0
      x := hb_HGetDef( ::a_a_Key, ::Upp( xKey ), NIL )
      IF HB_ISOBJECT( x ) .and. ","+x:ClassName+"," $ ",THMGDATA,TKEYDATA,"
         RETURN ::Json( x, xDef )
      ENDIF
   ENDIF

RETURN hb_HGetDef( ::a_a_Key, ::Upp( xKey ), xDef )
Aí não entendi nada.