XBROWSE PROVOCA ERROR AL REINGRESAR A LA CONSULTA

XBROWSE PROVOCA ERROR AL REINGRESAR A LA CONSULTA

Postby CARLOS ATUNCAR » Wed Jul 07, 2021 11:40 pm

Saludos tengo un problema con xbrowse al ingresar por primera vez a la consulta trabaja bien si cierro la ventana y quiero volver a ingresar me sale los siguientes errores
Called from: => LEN( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LASTDISPLAYPOS( 3360 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:MOUSEMOVE( 5101 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1827 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11652 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 448 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 24 )
Called from: => LEN( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LASTDISPLAYPOS( 3360 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:MOUSEMOVE( 5101 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1827 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11652 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 448 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 24 )
Called from: => LEN( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LASTDISPLAYPOS( 3360 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:MOUSEMOVE( 5101 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1827 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11652 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 448 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 24 )
Called from: => LEN( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LASTDISPLAYPOS( 3360 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:MOUSEMOVE( 5101 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1827 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11652 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 448 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 24 )
Called from: => LEN( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LASTDISPLAYPOS( 3360 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:MOUSEMOVE( 5101 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1827 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11652 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 448 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 24 )
Called from: => LEN( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LASTDISPLAYPOS( 3360 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:MOUSEMOVE( 5101 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1827 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11652 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 448 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 24 )
Called from: => LEN( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LASTDISPLAYPOS( 3360 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:MOUSEMOVE( 5101 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1827 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11652 )


Este es mi codigo

Code: Select all  Expand view

aCols :={;
          {"npersonal","APELLIDOS Y NOMBRES",NIL,240,AL_LEFT},;
          {"campana"  ,"CAMPAÑA",NIL,80,AL_LEFT},;
          {"nlabor"  ,"LABOR",NIL,120,AL_LEFT},;
          {{||""},"",NIL,40,AL_LEFT},;
          {{||""},"",NIL,40,AL_LEFT},;
          {"nparcela" ,"AREA",NIL,90,AL_LEFT},;
          {"idlote" ,"LOTE",NIL,90,AL_LEFT},;
          {"horas_n" ,"JORNAL",NIL,40,AL_RIGHT},;
          {"horas_e" ,"EXTRA",NIL,40,AL_RIGHT},;
          {"jornal_cant" ,"JORNALA",NIL,40,AL_RIGHT},;
          {"jornal_extra" ,"EXTRA",NIL,40,AL_RIGHT},;
          {{||LenVar(oQry:observ,"C",100)} ,"OBSERVACION",NIL,120,AL_LEFT},;
          {"semana" ,"SEM",NIL,30,AL_RIGHT},;
          {"fecha" ,"FECHA",NIL,55,AL_LEFT},;
          {"ndia" ,"DIA",NIL,55,AL_LEFT},;
          {"hora1" ,"HORA1",NIL,55,AL_LEFT},;
          {"hora2" ,"HORA2",NIL,55,AL_LEFT},;
          {"hora3" ,"HORA3",NIL,40,AL_LEFT},;
          {"hora4" ,"HORA4",NIL,40,AL_LEFT},;
          {"difehora" ,"HORAS",NIL,45,AL_LEFT},;
          {{||""},"",NIL,40,AL_LEFT},;
          {{||""},"",NIL,40,AL_LEFT},;
          {{||""},"",NIL,40,AL_LEFT};
         }


DEFINE ICON  oIco  FILE op:Icons+"people.ico"

DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-10
DEFINE FONT oBold NAME 'Segoe UI' SIZE 0,-12 BOLD
DEFINE FONT aFont[ 1 ] NAME 'Segoe UI' SIZE 0,12
DEFINE FONT oVfont NAME 'Segoe UI' SIZE 0,-12 NESCAPEMENT 900

DEFINE WINDOW oWndPlan FROM 0,0 TO oWind:nHeight-240,If(oWind:nWidth-250>1500,1500,oWind:nWidth-250) PIXEL MDICHILD  OF oWind         ;
       TITLE "MANTENIMIENTO DE ASISTENCIA DE PERSONAL" ICON oIco ;
       COLOR CLR_BLACK,RGB(250,250,250) STYLE nOr( WS_CAPTION, WS_VISIBLE )


      @0,0 XBROWSE oBrw OF oWndPlan                        ;
           DATASOURCE oQry                                 ;
           COLUMNS aCols                                   ;
           LINES CELL AUTOSORT FASTEDIT PIXEL


         WITH OBJECT oBrw
            :bClrRowFocus    := oBrw:bClrSelFocus
            :nRowHeight      := 25
            :lFooter         := .f.
            :nHeaderLines    := 3
            :nStretchCol     := 1
            :lAllowColHiding := .F.
            :lRecordSelector := .F.
            :oHeaderFonts    := oFont
            :SetDolphin( oQry, .F. )

            :nStretchCol         := 1
            :lColDividerComplete := .t.

            :nRowDividerStyle := LINESTYLE_LIGHTGRAY
            :bClrSel          := { || { CLR_BLACK, CLR_HGRAY } }
            :bClrEdits        := { || { CLR_BLACK, CLR_YELLOW }}
            :bClrStd          := filaColor() // COLOREAR LAS FILAS SEGUN CRITERIO



            :SetGroupHeader( 'Horas', 8,09, oFont )
            :SetGroupHeader( 'Jornales', 10,11, oFont )
            :SetGroupHeader( 'Marcaciones', 16,19, oFont )

            WITH OBJECT oBrw:aCols[02]
               :nEditType     := EDIT_LISTBOX
               :aEditListBound:= ArrTranspose( mSuper)[1]
               :aEditListTxt  := ArrTranspose( mSuper)[1]
               :bOnPostEdit  := { | o,v,n | ChangeSuper( v ) }
            END

            WITH OBJECT oBrw:aCols[03]
               :nEditType     := EDIT_GET
               :cEditPicture  := "@!"
               :bKeyDown      := {| nKey | (Changelabor(),oBrw:GoRight(),oBrw:GoRight(), oBrw:Refresh()) }
               :nDataStrAlign := AL_LEFT
            END
            WITH OBJECT oBrw:aCols[04]
                 :AddBmpFile( op:png+"add.png" )
                 :bBmpData        := { || 1 }
                 :lBmpStretch     := .f.
                 :lBmpTransparent := .t.
                 :nDataBmpAlign   := AL_CENTER
                 :oHeaderFont     := oVFont
                 :cHeader         := "Más"+CRLF+"Labores"
                 :bLDClickData  := { || GetLabores() }
                 :bToolTip := { || {"Ingreso de Labores Diarias ","Mantenimiento"}}
              END
            WITH OBJECT oBrw:aCols[05]
                 :AddBmpFile( op:png+"huellas.png" )
                 :bBmpData        := { || 1 }
                 :lBmpStretch     := .f.
                 :lBmpTransparent := .t.
                 :nDataBmpAlign   := AL_CENTER
                 :oHeaderFont     := oVFont
                 :cHeader         := "Labor"+CRLF+"Anterior"
                 :bLDClickData  := { || GetLaborOld(.t.) }
                 :bToolTip := { || {"Copiar labor del dia Anterior","Mantenimiento"}}
              END

              /*
             WITH OBJECT oBrw:aCols[05]
                :nEditType     := EDIT_LISTBOX
                :aEditListBound:= ArrTranspose( mAreas)[1]
                :aEditListTxt  := ArrTranspose( mAreas)[2]
                :bOnPostEdit   := { | o,v,n | ChangeArea( v ) }
                :nDataStrAlign := AL_LEFT
             END

             */

            WITH OBJECT oBrw:aCols[07]
               :nEditType     := EDIT_LISTBOX
               :aEditListBound:= ArrTranspose( mLotes)[1]
               :aEditListTxt  := ArrTranspose( mLotes)[2]
               :bOnPostEdit   := { | o,v,n | ChangeLote( v ) }
               :nDataStrAlign := AL_LEFT
            END

            WITH OBJECT oBrw:aCols[08]
               :nEditType     := EDIT_GET
               :cEditPicture  := "@E 999.99"
               :bOnPostEdit   := { | o,v,n | ChangeHoras( v,"N" ) }
               :nDataStrAlign := AL_RIGHT
            END
            WITH OBJECT oBrw:aCols[09]
               :nEditType     := EDIT_GET
               :cEditPicture  := "@E 999.99"
               :bOnPostEdit   := { | o,v,n | ChangeHoras( v,"E" ) }
               :nDataStrAlign := AL_RIGHT
            END
            WITH OBJECT oBrw:aCols[10]
               :cEditPicture  := "@E 999.99"
               :nDataStrAlign := AL_RIGHT
            END
            WITH OBJECT oBrw:aCols[11]
               :nEditType     := EDIT_GET
               :cEditPicture  := "@E 999.99"
               :bOnPostEdit   := { | o,v,n | ChangeJrnEx( v ) }
               :nDataStrAlign := AL_RIGHT
            END

            WITH OBJECT oBrw:aCols[12]
               :cDataType     := "C"
               :cEditPicture  := "@!"
               :bOnPostEdit   := { | o,v,n | ChangeObs( v ) }
               :nDataStrAlign := AL_LEFT
               :nEditType     := EDIT_GET

            END

            WITH OBJECT oBrw:aCols[20]
               :bClrStd    :={|| iif (oQry:marca_modo=='M', {CLR_BLACK,CLR_YELLOW},{CLR_BLACK,nRGB(255,248,220)})}

            END

            WITH OBJECT oBrw:aCols[21]
                 :AddBmpFile( op:bmp16+"checkon.bmp" )
                 :AddBmpFile( op:bmp16+"checkoff.bmp" )
                 :AddBmpFile( op:bmp16+"warning.bmp" )
                 :bBmpData        := { || mopcion(oQry:verificacion) }
                 :lBmpStretch     := .f.
                 :lBmpTransparent := .t.
                 :nDataBmpAlign   := AL_CENTER
                 :oHeaderFont     := oVFont
                 :cHeader         := "Verificado"
            END
            WITH OBJECT oBrw:aCols[22]
                 :AddBmpFile( op:bmp16+"noentry.bmp" )
                 :bBmpData        := { || if( oQry:bloqueo1='S',1,0) }
                 :lBmpStretch     := .f.
                 :lBmpTransparent := .t.
                 :nDataBmpAlign   := AL_CENTER
                 :oHeaderFont     := oVFont
                 :cHeader         := "Cerrado"
                 :bLDClickData  := { || AbreDia() }
                 :bToolTip := { || {"Registro cerrado ","Mantenimiento"}}
            END

            WITH OBJECT oBrw:aCols[23]
                 :AddBmpFile( op:png+"abort.png" )
                 :bBmpData        := { || if( oQry:bloqueo2='S',1,0) }
                 :lBmpStretch     := .f.
                 :lBmpTransparent := .t.
                 :nDataBmpAlign   := AL_CENTER
                 :oHeaderFont     := oVFont
                 :cHeader         := "Bloqueado"
                 :bToolTip := { || {"Registro cerrado ","Mantenimiento"}}
            END

            :bRClicked := { | nRow, nCol | ShowPopup( nRow, nCol ) }

         END

         oBrw:aCols[01]:bLClickHeader := {|| SetOrden(oBrw:aCols[01],"npersonal ASC",oQry )}
         oBrw:aCols[02]:bLClickHeader := {|| SetOrden(oBrw:aCols[02],"a.idsupervisor+0 ASC",oQry )}
         oBrw:aCols[03]:bLClickHeader := {|| SetOrden(oBrw:aCols[03],"m.idlabor+0 ASC",oQry )}
         oBrw:aCols[05]:bLClickHeader := {|| SetOrden(oBrw:aCols[05],"m.idparcela+0 ASC",oQry )}

         AEval( oBrw:aCols, { | o | o:nHeadStrAlign := AL_CENTER,o:oDataFont := oFont } )

         oBrw:CreateFromCode()

         oWndPlan:oClient := oBrw

   BrwBtnBar()

   WaitOff( @oWait )

ACTIVATE WINDOW oWndPlan ON INIT oBrw:SetFocus()

RELEASE FONT oBold
 
Carlos Atuncar - CaSoftSystem
Chincha - Perú
CARLOS ATUNCAR
 
Posts: 166
Joined: Thu Sep 17, 2015 11:40 pm
Location: Chincha - Peru

Re: XBROWSE PROVOCA ERROR AL REINGRESAR A LA CONSULTA

Postby karinha » Thu Jul 08, 2021 1:24 pm

Que hace esto?

Code: Select all  Expand view

   {{||LenVar(oQry:observ,"C",100)} ,"OBSERVACION",NIL,120,AL_LEFT},;
 


Code: Select all  Expand view

   WaitOff( @oWait )  // ????
 


Sintaxis de el esta correcta?

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

Re: XBROWSE PROVOCA ERROR AL REINGRESAR A LA CONSULTA

Postby CARLOS ATUNCAR » Thu Jul 22, 2021 12:22 pm

karinha wrote:Que hace esto?

Code: Select all  Expand view

   {{||LenVar(oQry:observ,"C",100)} ,"OBSERVACION",NIL,120,AL_LEFT},;
 


Code: Select all  Expand view

   WaitOff( @oWait )  // ????
 


Sintaxis de el esta correcta?

Regards, saludos.


En la Primera uso una funcion que ajuste los datos recibidos a 100 caracteres para luego ser editado en el caso este vacio,
y en la segunda cierro la venta de espera mientras hago la carga del proceso
Carlos Atuncar - CaSoftSystem
Chincha - Perú
CARLOS ATUNCAR
 
Posts: 166
Joined: Thu Sep 17, 2015 11:40 pm
Location: Chincha - Peru

Re: XBROWSE PROVOCA ERROR AL REINGRESAR A LA CONSULTA

Postby karinha » Fri Jul 23, 2021 12:54 pm

Buén dia. És posible hacer un ejemplo?

Post en:

https://mega.nz/

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

Re: XBROWSE PROVOCA ERROR AL REINGRESAR A LA CONSULTA

Postby CARLOS ATUNCAR » Fri Jul 23, 2021 5:35 pm

Gracias lo preparo y lo subo
Carlos Atuncar - CaSoftSystem
Chincha - Perú
CARLOS ATUNCAR
 
Posts: 166
Joined: Thu Sep 17, 2015 11:40 pm
Location: Chincha - Peru


Return to FiveWin para Harbour/xHarbour

Who is online

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