Antonio Error En Listbox....

Antonio Error En Listbox....

Postby cmarucco » Mon Nov 23, 2009 5:40 pm

Antonio:
De casualidad, presione donde se explica en la imagen y surgio un error...
Te adjunto imagen, error.log y parte del codigo donde ocurre en error del listbox

Image

Code: Select all  Expand view
Application
===========
   Path and name: c:\css\facturacioncss\Menupres.Exe (32 bits)
   Size: 1,823,232 bytes
   Time from start: 0 hours 0 mins 13 secs
   Error occurred at: 23/11/2009, 14:19:47
   Error description: Error BASE/1132  Bound error: array access
   Args:
     [   1] = A   { ... }
     [   2] = N   0

Stack Calls
===========
   Called from: .\source\classes\WBROWSE.PRG => TWBROWSE:LBUTTONDOWN(1118)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\CONTROL.PRG => TWBROWSE:HANDLEEVENT(1453)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3333)
   Called from:  => DIALOGBOX(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
   Called from: ftepres\prestador.PRG => BUSCO_DIAG(809)
   Called from: ftepres\prestador.PRG => (b)SIGOBONOS(297)
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:LBUTTONDOWN(1821)
   Called from: .\source\classes\CONTROL.PRG => TBITMAP:LBUTTONDOWN(485)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1453)
   Called from: .\source\classes\BITMAP.PRG => TBITMAP:HANDLEEVENT(511)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3333)
   Called from:  => DIALOGBOX(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
   Called from: ftepres\prestador.PRG => SIGOBONOS(413)
   Called from: ftepres\prestador.PRG => (b)BONOS(157)
   Called from: .\source\classes\BUTTON.PRG => TBUTTON:CLICK(176)
   Called from: .\source\classes\CONTROL.PRG => TBUTTON:HANDLEEVENT(1411)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3333)
   Called from:  => SENDMESSAGE(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:COMMAND(407)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT(928)
   Called from:  => DIALOGBOX(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
   Called from: ftepres\prestador.PRG => BONOS(163)
   Called from: ftepres\prestador.PRG => (b)FACTURACION(60)
   Called from: .\source\classes\BUTTON.PRG => TBUTTON:CLICK(176)
   Called from: .\source\classes\CONTROL.PRG => TBUTTON:HANDLEEVENT(1411)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3333)
   Called from:  => SENDMESSAGE(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:COMMAND(407)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT(928)
   Called from:  => DIALOGBOX(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
   Called from: ftepres\prestador.PRG => FACTURACION(68)
   Called from: ftepres\menupres.prg => (b)BUILDMENU(143)
   Called from: .\source\classes\MENU.PRG => TMENU:COMMAND(437)
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND(1003)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3333)
   Called from:  => WINRUN(0)
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(952)
   Called from: ftepres\menupres.prg => MENU(90)
 



Code: Select all  Expand view
DEFINE DIALOG oDlg RESOURCE "Buscadiag" OF oWnd Title OemToAnsi("Consulta y Selecci¢n de Diagn¢sticos")

   REDEFINE SAY o199 VAR cTexto        ID 199 OF oDlg  Font oFont12b

   Redefine Listbox oLbx Fields;
             Diagaux->Clave,Diagaux->Descrip;
             Headers "Clave",OemToAnsi("Descripci¢n");
             Fieldsizes 40,400;
             ON Dblclick (cDiag1:=Diagaux->Clave,oDlg:END());
             id 600 Of oDlg color rgb(0,0,0), rgb(141,184,146) Font oFont12b

   oLbx:aJustify = {.F.,.F.}
   oLbx:aActions        := ARRAY( LEN( oLbx:aHeaders ) )
   oLbx:aActions[  1 ]  := { || (Diagaux->(OrdSetFocus("Clave"))  ,oLbx:GoTop(), oLbx:Refresh()) }
   oLbx:aActions[  2 ]  := { || (Diagaux->(OrdSetFocus("Descrip")),oLbx:GoTop(), oLbx:Refresh()) }

   oLbx:nClrText      = { || SelColorDiagaux() }
 


Desde ya muchas Gracias.

Carlos Gustavo Marucco
Rio Gallegos - Santa cruz
PATAGONIA ARGENTINA
Carlos Gustavo Marucco
Rio Gallegos - Santa Cruz
PATAGONIA ARGENTINA
FWH 10.08 - Eagle1 Ver 6.0 - xHarbour 1.2.1 Rev 6717
xMate Ver 1.15 - Workshop Ver 4.5 - Windows 7
User avatar
cmarucco
 
Posts: 46
Joined: Tue Oct 11, 2005 2:23 pm
Location: argentina

Re: Antonio Error En Listbox....

Postby Ramon Paredes » Mon Nov 23, 2009 7:17 pm

cmarucco,

donde envias el doble click deberia decir ON LEFT DBLCLICK probablemente esto este ocasionandote el error,

ojala te sirva de algo

saludes desde Managua, Nicaragua

Ramon Paredes
... Desde la Tierra de lagos y Volcanes......
User avatar
Ramon Paredes
 
Posts: 215
Joined: Fri Feb 02, 2007 3:38 pm
Location: Managua, Nicaragua

Re: Antonio Error En Listbox....

Postby karinha » Tue Nov 24, 2009 11:25 am

Code: Select all  Expand view

#Include "FiveWin.Ch"


Request OrdKeyNo
Request OrdKeyCount
Request OrdKeyGoto

//--------------------------------------------------------------------------//
// Edicao dos dados
//--------------------------------------------------------------------------//
FUNCTION CONVENIO( DeOndeVem )


   //-> Dialogo By Borland Resource WORKSHOP.EXE
   DEFINE DIALOG oDlg RESOURCE "DLG_CONVENIO"                                ;
          COLOR nRgb( 000, 000, 000 ), nRgb( 238, 221, 187 )

   oDlg:lHelpIcon := .F.

   REDEFINE LISTBOX oLbx FIELDS                                              ;
            ( cAlias )->CODIGO                                             , ;
            ( cAlias )->NOME                                               , ;
            ( cAlias )->APELIDO                                            , ;
            ( cAlias )->END                                                , ;
            ( cAlias )->BAI                                                , ;
            ( cAlias )->CID                                                , ;
            ( cAlias )->UF                                                 , ;
            ( cAlias )->CEP                                                , ;
            ( cAlias )->TEL                                                , ;
            ( cAlias )->TEL2                                               , ;
            ( cAlias )->TEL3                                               , ;
            ( cAlias )->CGC                                                , ;
            ( cAlias )->IE                                                 , ;
            ( cAlias )->CONTATO                                            , ;
            ( cAlias )->RAMAL_1                                            , ;
            ( cAlias )->RAMAL_2                                            , ;
            ( cAlias )->DATA_CADAS                                         , ;
            ( cAlias )->MELHOR_DIA                                         , ;
            ( cAlias )->VALOR_DEV                                          , ;
            ( cAlias )->VALOR_PERD                                         , ;
            ( cAlias )->VLPERDAACE                                         , ;
            ( cAlias )->EMAIL                                              , ;
            ( cAlias )->WEB                                                , ;
            ( cAlias )->OBS                                                , ;
            ( cAlias )->OBS2                                               , ;
            ( cAlias )->OBS3                                               , ;
            SPACE(01)                                                        ;
            HEADERS ( OemToAnsi( "CODIGO     " ) )                         , ;
                    ( OemToAnsi( "NOME       " ) )                         , ;
                    ( OemToAnsi( "APELIDO    " ) )                         , ;
                    ( OemToAnsi( "ENDERE€O   " ) )                         , ;
                    ( OemToAnsi( "BAIRRO     " ) )                         , ;
                    ( OemToAnsi( "CIDADE     " ) )                         , ;
                    ( OemToAnsi( "UF         " ) )                         , ;
                    ( OemToAnsi( "CEP        " ) )                         , ;
                    ( OemToAnsi( "FONE       " ) )                         , ;
                    ( OemToAnsi( "FONE       " ) )                         , ;
                    ( OemToAnsi( "FONE       " ) )                         , ;
                    ( OemToAnsi( "CNPJ       " ) )                         , ;
                    ( OemToAnsi( "IE         " ) )                         , ;
                    ( OemToAnsi( "CONTATO    " ) )                         , ;
                    ( OemToAnsi( "RAMAL 1    " ) )                         , ;
                    ( OemToAnsi( "RAMAL 2    " ) )                         , ;
                    ( OemToAnsi( "CADASTRO EM" ) )                         , ;
                    ( OemToAnsi( "MELHOR DIA " ) )                         , ;
                    ( OemToAnsi( "VALOR DEV  " ) )                         , ;
                    ( OemToAnsi( "% PERDA    " ) )                         , ;
                    ( OemToAnsi( "PERDA ACE  " ) )                         , ;
                    ( OemToAnsi( "EMAIL      " ) )                         , ;
                    ( OemToAnsi( "WEB        " ) )                         , ;
                    ( OemToAnsi( "OBS1       " ) )                         , ;
                    ( OemToAnsi( "OBS2       " ) )                         , ;
                    ( OemToAnsi( "OBS3       " ) )                         , ;
                    ( OemToAnsi( " - "         ) )                           ;
            FIELDSIZES 070, 450, 300, 500, 200, 200, 070, 100, 190, 190, 190,;
                       200, 200, 400, 070, 070, 100, 070, 130, 130, 130, 450,;
                       450, 750, 750, 750, 01                                ;
            COLOR CLR_BROWN, CLR_LGREEN                                      ;
            CURSOR oCurDedo  FONT oFnt                                       ;
            UPDATE                                                           ;
            ON CHANGE( CARREGACON(oLbx), lSalvar := .F., lEsAlta := .F.,     ;
                                                     lEsModi := .F. )        ;
            ID 1013 OF oDlg            

   //-----------------------------------------------------------------------//
   oLbx:nClrBackHead  := CLR_GREEN
   oLbx:nClrText      := {|| nRGB( 165,  42,  42 ) }
   oLbx:nClrBackFocus := CLR_HRED
   oLbx:nClrForeFocus := CLR_YELLOW
   oLbx:nClrForeHead  := CLR_HRED

   oLbx:nClrPane      := { || IIF( ( oLbx:cAlias )->( OrdKeyNo() ) %2 == 0, ;
                              CLR_GREEN, CLR_LGRAY ) }
   oLbx:nColAct       := 2
   oLbx:nLineStyle    := 3
   oLbx:lCellStyle    := .T.
   //-> Agrega esto:
   oLbx:aJustify := { .T., .F., .F., .F., .F., .F., .F., .F., .F., .F., .F., ;
                      .F., .F., .F., .F., .F., .F., .F., .F., .F., .F., .F., ;
                      .F., .F., .F., .F., .F., .F., .F., .F., .F., .F., .F. }
   oLbx:lMChange      := .F.
   oLbx:SetFocus()
   oLbx:Refresh()

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



   ACTIVATE DIALOG oDlg CENTERED

   DbCloseArea()

   oFont:End()
   oFnt:End()  

   Release All


RETURN NIL
 


Saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7251
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Antonio Error En Listbox....

Postby cmarucco » Tue Nov 24, 2009 1:38 pm

Gracias por las respuestas ..... pero he probado con ambas y sigue el mismo error .....
Carlos Gustavo Marucco
Rio Gallegos - Santa Cruz
PATAGONIA ARGENTINA
FWH 10.08 - Eagle1 Ver 6.0 - xHarbour 1.2.1 Rev 6717
xMate Ver 1.15 - Workshop Ver 4.5 - Windows 7
User avatar
cmarucco
 
Posts: 46
Joined: Tue Oct 11, 2005 2:23 pm
Location: argentina

Re: Antonio Error En Listbox....

Postby Antonio Linares » Tue Nov 24, 2009 2:39 pm

Carlos,

Puedes copiar aqui el código que tiene el wbrowse.prg en la línea 1118 ? gracias :-)

.\source\classes\WBROWSE.PRG => TWBROWSE:LBUTTONDOWN(1118)
regards, saludos

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

Re: Antonio Error En Listbox....

Postby cmarucco » Tue Nov 24, 2009 4:48 pm

Gracias Antonio....
Aqui va lo que pediste, con nota de donde esta la linea 1118 ....

Code: Select all  Expand view
  if nClickRow == 0 .and. Valtype(nKeyFlags) == "N"
      if ::aActions != nil .and. ;
         ( nAtCol := ::nAtCol( nCol ) ) <= Len( ::aActions )
            if ::aActions[ nAtCol ] != nil            ------->>>>      //Esta es  Linea 1118 !!!!!
               wBrwLine( ::hWnd, ::GetDC(), 0, ::aHeaders, ::GetColSizes(),;
                         ::nColPos, ::nClrForeHead, ::nClrBackHead,;
                         If( ::oFont != nil, ::oFont:hFont, 0 ),.f.,;
                         ::aJustify, nAtCol, ::nLineStyle,,, ::oVScroll, ::bLogicLen )
               ::ReleaseDC()
               Eval( ::aActions[ nAtCol ], Self, nRow, nCol )
               wBrwLine( ::hWnd, ::GetDC(), 0, ::aHeaders, ::GetColSizes(),;
                         ::nColPos, ::nClrForeHead, ::nClrBackHead,;
                         If( ::oFont != nil, ::oFont:hFont, 0 ),.f.,;
                         ::aJustify,, ::nLineStyle,,, ::oVScroll, ::bLogicLen )
               ::ReleaseDC()
            else
               MsgBeep()
            endif
      else
         MsgBeep()
      endif
   endif
Carlos Gustavo Marucco
Rio Gallegos - Santa Cruz
PATAGONIA ARGENTINA
FWH 10.08 - Eagle1 Ver 6.0 - xHarbour 1.2.1 Rev 6717
xMate Ver 1.15 - Workshop Ver 4.5 - Windows 7
User avatar
cmarucco
 
Posts: 46
Joined: Tue Oct 11, 2005 2:23 pm
Location: argentina

Re: Antonio Error En Listbox....

Postby Antonio Linares » Tue Nov 24, 2009 6:27 pm

Carlos,

Tendrias que modificar el código de wbrowse.prg de esta forma:
Code: Select all  Expand view

  if nClickRow == 0 .and. Valtype(nKeyFlags) == "N"
      if ::aActions != nil .and. ;
         ( nAtCol := ::nAtCol( nCol ) ) <= Len( ::aActions ) .and. nAtCol != 0  // aqui !!!
            if ::aActions[ nAtCol ] != nil            ------->>>>      //Esta es  Linea 1118 !!!
 

luego puedes enlazar el wbrowse.prg como un PRG de tu aplicación ó reemplazarlo en FiveH.lib
regards, saludos

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

Re: Antonio Error En Listbox....

Postby cmarucco » Wed Nov 25, 2009 4:24 pm

Antonio: Modifique lo que me apuntaste, actualice Fivehx.lib y funciono perfectamente .....
Muchas Gracias .....
Carlos Gustavo Marucco
Rio Gallegos - Santa Cruz
PATAGONIA ARGENTINA
FWH 10.08 - Eagle1 Ver 6.0 - xHarbour 1.2.1 Rev 6717
xMate Ver 1.15 - Workshop Ver 4.5 - Windows 7
User avatar
cmarucco
 
Posts: 46
Joined: Tue Oct 11, 2005 2:23 pm
Location: argentina

Re: Antonio Error En Listbox....

Postby Antonio Linares » Wed Nov 25, 2009 7:43 pm

Carlos,

bien :-)
regards, saludos

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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 10 guests

cron