fw_menudraw

fw_menudraw

Postby russimicro » Mon Oct 09, 2023 2:39 pm

Buen dia...

Estoy obteniendo este error despues de actualizar a fwh 23.04

Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20150726)
FiveWin Version : FWH 23.04
Windows version: 6.2, Build 9200

Time from start: 0 hours 0 mins 15 secs
Error occurred at: 10/09/2023, 08:11:47
Error description: Error BASE/1066 Error de argumento: conditional
Args:
[ 1] = B {|| ... }

Stack Calls
===========
Called from: .\source\classes\PDMENU.PRG => FW_MENUDRAW( 941 )
Called from: .\source\classes\WINDOW.PRG => TMETROBTN:DRAWITEM( 1265 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1857 )
Called from: .\source\classes\BTNBMP.PRG => TMETROBTN:HANDLEEVENT( 2135 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3693 )
Called from: => TRACKPOPUP( 0 )
Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE( 1805 )
Called from: C:\FWH23\source\classes\metropnl.prg => TMETROBTN:DESIGNMENU( 825 )
Called from: C:\FWH23\source\classes\metropnl.prg => (b)TMETROBTN:NEW( 609 )
Called from: .\source\classes\WINDOW.PRG => TMETROBTN:RBUTTONDOWN( 2188 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1857 )
Called from: .\source\classes\BTNBMP.PRG => TMETROBTN:HANDLEEVENT( 2135 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3693 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1118 )
Called from: FUENTES\COMUNES\FW_FUNCSST3.PRG => PRINCIPAL_METRO( 7079 )
Called from: FUENTES\COMUNES\FW_FUNCSST1.PRG => PRINCIPAL( 1341 )
Called from: FUENTES\MAIN\ZerusMain.prg => ZERUSMAIN( 4230 )
Called from: zeruswin.prg => MAIN( 17 )
russimicro
 
Posts: 260
Joined: Sun Jan 31, 2010 3:30 pm
Location: Bucaramanga - Colombia

Re: fw_menudraw

Postby karinha » Mon Oct 09, 2023 3:00 pm

Muestra:

Code: Select all  Expand view

Called from: FUENTES\MAIN\ZerusMain.prg => ZERUSMAIN( 4230 )
Called from: zeruswin.prg => MAIN( 17 )
 


Algo no está bién aqui.

Error description: Error BASE/1066 Error de argumento: conditional - éS una variable lógica? STATIC ó PUBLIC?

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

Re: fw_menudraw - No solucionado

Postby russimicro » Thu Dec 28, 2023 9:47 pm

Buena tarde...

Persiste error con version 23.10

Code: Select all  Expand view


Application
===========
   Path and name: D:\RUSSOFT\ZERUS\zeruswin.exe (32 bits)
   Size: ********* bytes
   Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20150726)
   FiveWin  Version : FWH 23.10
   Windows version: 6.2, Build 9200

   Time from start: 8 hours 20 mins 40 secs
   Error occurred at: 12/28/2023, 16:28:05
   Error description: Error BASE/1066  Error de argumento: conditional
   Args:
     [   1] = B   {|| ... }

Stack Calls
===========
   Called from: .\source\classes\PDMENU.PRG => FW_MENUDRAW( 918 )
   Called from: .\source\classes\WINDOW.PRG => TMETROBTN:DRAWITEM( 1256 )
   Called from:  => TWINDOW:HANDLEEVENT( 0 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1861 )
   Called from: .\source\classes\BTNBMP.PRG => TMETROBTN:HANDLEEVENT( 2138 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3648 )
   Called from:  => TRACKPOPUP( 0 )
   Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE( 1796 )
   Called from: C:\FWH23\source\classes\metropnl.prg => TMETROBTN:DESIGNMENU( 830 )
   Called from: C:\FWH23\source\classes\metropnl.prg => (b)TMETROBTN:NEW( 614 )
   Called from: .\source\classes\WINDOW.PRG => TMETROBTN:RBUTTONDOWN( 2164 )
   Called from:  => TWINDOW:HANDLEEVENT( 0 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1861 )
   Called from: .\source\classes\BTNBMP.PRG => TMETROBTN:HANDLEEVENT( 2138 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3648 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 309 )
   Called from: FUENTES\GESTION\INVENTARIOS\INTERFW2.PRG => LLEEMVTOS( 905 )
   Called from: FUENTES\GESTION\INVENTARIOS\FACTCAPT.PRG => A_FACTCAPT_CAPTURA_( 863 )
   Called from: FUENTES\GESTION\INVENTARIOS\FACTCAPT.PRG => A_FACTCAPT_CAPTURA( 71 )
   Called from: FUENTES\COMUNES\FW_FUNCSST3.PRG => (b)TOUCHMENU3( 8476 )
   Called from: C:\FWH23\source\classes\metropnl.prg => (b)TMETROBTN:NEW( 623 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:LBUTTONUP( 2091 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:LBUTTONUP( 721 )
   Called from: .\source\classes\BTNBMP.PRG => TMETROBTN:LBUTTONUP( 1036 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1851 )
   Called from: .\source\classes\BTNBMP.PRG => TMETROBTN:HANDLEEVENT( 2138 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3648 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1112 )
   Called from: FUENTES\COMUNES\FW_FUNCSST3.PRG => PRINCIPAL_METRO( 7133 )
   Called from: FUENTES\COMUNES\FW_FUNCSST1.PRG => PRINCIPAL( 1351 )
   Called from: FUENTES\MAIN\ZerusMain.prg => ZERUSMAIN( 4231 )
   Called from: zeruswin.prg => MAIN( 17 )

System

///*****************************************

         #ifdef __FWXH__   // FIVEWIN

            CLOSE ALL


            PRINCIPAL(cIngOld)  // MENUS WINDOWS CON FIVEWIN


            cArcPrn := ''
            IF FILE(M->cArcImp)
               cArcPrn := fopen(M->cArcImp,2)
               FCLOSE(cArcPrn)
               IF NETERR(cArcPrn)
                  FCLOSE(cArcPrn)
               ENDIF
               FERASE(M->cArcImp)
            ENDIF
            CLS
            QUIT
//****************************************************

FUNCTION PRINCIPAL(cIngOld)

   LOCAL cPatLoc := "C:\TEMP\"

   cambiaTemp(@cPatLoc)

   IF cIngOld <> NIL .AND. cIngOld <> "
NIL"
      PRINCIPAL_TOOL()
   ELSE
      PRINCIPAL_METRO() // 1351
   ENDIF


RETURN NIL

//****************************************************************

FUNCTION PRINCIPAL_METRO()

LOCAL oBrush,hborland,oCursor,oCursorPen,oFont, oFon
LOCAL cDirAct := DISKNAME()+"
:"+XDIRNAME()+"\"+cCodCia
LOCAL oTimer , oSprite  , oIco,oPopup3, oPopup2
LOCAL cTipCon := "
", cImaFon, SW := 0 ,oMetPri
LOCAL nDurTim := 3000 ,oErr  // cada dos minutos
LOCAL cPatLoc := "
C:\TEMP"

PRIVATE lActFun := .F., cNomFon := "
imagenes\fondonegro1.bmp"  // 7 ok

MEMVAR oBar, Omenu
PUBLIC oImageList, oToolBar, oBa1r, oBar, Omenu

cambiaTemp(@cPatLoc)

   IF M->lProEje
      MYMEN("
Error. El programa ya esta en ejecuci¢n")
      RETURN NIL
   ENDIF


   M->lProEje := .T.


   Ctrl_F7 := {"
BorraMoviConcepto(cPatSis)"}



   SetResDebug( .T. )
   //  SetResCheck()
   IF FILE("
IMAGENES\zeruswin.ico")
      DEFINE ICON oIco  FILENAME "
IMAGENES\zeruswin.ico"
   ENDIF


   M->cTitVenPri := HB_OEMTOANSI("
Russoft ERP. Sistema de Gesti¢n Empresarial " +"(Versi¢n : "+m->cFecVerZer+")"+ " | "+ cCiaAct +" - "+ cCiaNom )

   DEFINE WINDOW oWnd FROM 0, 0 TO 46, 128 ;
                 TITLE M->cTitVenPri            ;
                 ICON oIco                      ;
                 MENU  MenuPrincipal(oWnd)

                 /*
                 oMetPri := MakeMetroPanelPrincipal( oWnd,oBrush )
                 IF oMetPri == NIL
                    RETURN NIL
                 ENDIF
                 m->oMetWin := oMetPri
                 */



   ACTIVATE WINDOW oWnd MAXIMIZED  ; //7133
                       ON INIT ( oMetPri := MakeMetroPanelPrincipal( oWnd, oBrush ), ;
                                 m->oMetWin := oMetPri, ;
                                 oMetPri:Show(),;
                                 oTimer := XTimers(),;
                                 LINEAESTADOFW(oWnd)  )

return

//**************************************************************


russimicro
 
Posts: 260
Joined: Sun Jan 31, 2010 3:30 pm
Location: Bucaramanga - Colombia

Re: fw_menudraw

Postby Antonio Linares » Thu Dec 28, 2023 9:57 pm

Puedes propocionar un pequeño y completo PRG de ejemplo ?

gracias
regards, saludos

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

Re: fw_menudraw

Postby russimicro » Thu Dec 28, 2023 10:04 pm

Antonio buena tarde...

El error es esporádico... anexe desde el llamado del primer método... para ver manejo de variables según expreso KARINA

Gracias
russimicro
 
Posts: 260
Joined: Sun Jan 31, 2010 3:30 pm
Location: Bucaramanga - Colombia

Re: fw_menudraw

Postby karinha » Tue Jan 02, 2024 2:31 pm

Publique estas funciones o haga una DEMO para que podamos compilar y encontrar la falla o el error.

Code: Select all  Expand view

   Called from: FUENTES\COMUNES\FW_FUNCSST3.PRG => PRINCIPAL_METRO( 7133 )
   Called from: FUENTES\COMUNES\FW_FUNCSST1.PRG => PRINCIPAL( 1351 )
   Called from: FUENTES\MAIN\ZerusMain.prg => ZERUSMAIN( 4231 )
 


Comprenda que no existe ningún programador que pueda encontrar un error sin el código fuente completo.

Gracias.

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

Re: fw_menudraw

Postby russimicro » Mon Jan 08, 2024 9:55 pm

Buena tarde... el código esta publicado
russimicro
 
Posts: 260
Joined: Sun Jan 31, 2010 3:30 pm
Location: Bucaramanga - Colombia

Re: fw_menudraw

Postby russimicro » Mon Jan 08, 2024 9:56 pm

Code: Select all  Expand view

    #ifdef __FWXH__   // FIVEWIN

            CLOSE ALL


            PRINCIPAL(cIngOld)  // MENUS WINDOWS CON FIVEWIN


            cArcPrn := ''
            IF FILE(M->cArcImp)
               cArcPrn := fopen(M->cArcImp,2)
               FCLOSE(cArcPrn)
               IF NETERR(cArcPrn)
                  FCLOSE(cArcPrn)
               ENDIF
               FERASE(M->cArcImp)
            ENDIF
            CLS
            QUIT
//****************************************************

FUNCTION PRINCIPAL(cIngOld)

   LOCAL cPatLoc := "C:\TEMP\"

   cambiaTemp(@cPatLoc)

   IF cIngOld <> NIL .AND. cIngOld <> "
NIL"
      PRINCIPAL_TOOL()
   ELSE
      PRINCIPAL_METRO() // 1351
   ENDIF


RETURN NIL

//****************************************************************

FUNCTION PRINCIPAL_METRO()

LOCAL oBrush,hborland,oCursor,oCursorPen,oFont, oFon
LOCAL cDirAct := DISKNAME()+"
:"+XDIRNAME()+"\"+cCodCia
LOCAL oTimer , oSprite  , oIco,oPopup3, oPopup2
LOCAL cTipCon := "
", cImaFon, SW := 0 ,oMetPri
LOCAL nDurTim := 3000 ,oErr  // cada dos minutos
LOCAL cPatLoc := "
C:\TEMP"

PRIVATE lActFun := .F., cNomFon := "
imagenes\fondonegro1.bmp"  // 7 ok

MEMVAR oBar, Omenu
PUBLIC oImageList, oToolBar, oBa1r, oBar, Omenu

cambiaTemp(@cPatLoc)

   IF M->lProEje
      MYMEN("
Error. El programa ya esta en ejecuci¢n")
      RETURN NIL
   ENDIF


   M->lProEje := .T.


   Ctrl_F7 := {"
BorraMoviConcepto(cPatSis)"}



   SetResDebug( .T. )
   //  SetResCheck()
   IF FILE("
IMAGENES\zeruswin.ico")
      DEFINE ICON oIco  FILENAME "
IMAGENES\zeruswin.ico"
   ENDIF


   M->cTitVenPri := HB_OEMTOANSI("
Russoft ERP. Sistema de Gesti¢n Empresarial " +"(Versi¢n : "+m->cFecVerZer+")"+ " | "+ cCiaAct +" - "+ cCiaNom )

   DEFINE WINDOW oWnd FROM 0, 0 TO 46, 128 ;
                 TITLE M->cTitVenPri            ;
                 ICON oIco                      ;
                 MENU  MenuPrincipal(oWnd)

                 /*
                 oMetPri := MakeMetroPanelPrincipal( oWnd,oBrush )
                 IF oMetPri == NIL
                    RETURN NIL
                 ENDIF
                 m->oMetWin := oMetPri
                 */



   ACTIVATE WINDOW oWnd MAXIMIZED  ; //7133
                       ON INIT ( oMetPri := MakeMetroPanelPrincipal( oWnd, oBrush ), ;
                                 m->oMetWin := oMetPri, ;
                                 oMetPri:Show(),;
                                 oTimer := XTimers(),;
                                 LINEAESTADOFW(oWnd)  )

return

//**************************************************************

russimicro
 
Posts: 260
Joined: Sun Jan 31, 2010 3:30 pm
Location: Bucaramanga - Colombia

Re: fw_menudraw

Postby karinha » Tue Jan 09, 2024 1:54 pm

Dudas:

Code: Select all  Expand view

    #ifdef __FWXH__   // FIVEWIN

            // CLOSE ALL  // PORQUE??

            PRINCIPAL(cIngOld)  // MENUS WINDOWS CON FIVEWIN
 
            cArcPrn := ''

            IF FILE(M->cArcImp)
               cArcPrn := fopen(M->cArcImp,2)
               FCLOSE(cArcPrn)
               IF NETERR(cArcPrn)
                  FCLOSE(cArcPrn)
               ENDIF
               FERASE(M->cArcImp)
            ENDIF

            /*
            CLS // HARBOUR MODO CONSOLA?
            QUIT
            */


            DbCommitAll()
            DbUnLockAll()
            DbCloseAll()
            FreeResources()
            Release All
            SysRefresh()

            HB_GCALL( .T. )

            CLEAR MEMORY

            PostQuitMessage( 0 )

            QUIT

//****************************************************

FUNCTION PRINCIPAL(cIngOld)

   LOCAL cPatLoc := "C:\TEMP\"

   cambiaTemp(@cPatLoc)

   IF cIngOld <> NIL .AND. cIngOld <> "
NIL"
      PRINCIPAL_TOOL()
   ELSE
      PRINCIPAL_METRO() // 1351
   ENDIF


RETURN NIL

//****************************************************************

FUNCTION PRINCIPAL_METRO() // no esta completo.

   LOCAL oBrush,hborland,oCursor,oCursorPen,oFont, oFon
   LOCAL cDirAct := DISKNAME()+"
:"+XDIRNAME()+"\"+cCodCia
   LOCAL oTimer , oSprite  , oIco,oPopup3, oPopup2
   LOCAL cTipCon := "
", cImaFon, SW := 0 ,oMetPri
   LOCAL nDurTim := 3000 ,oErr  // cada dos minutos
   LOCAL cPatLoc := "
C:\TEMP"

   // ES USADO EN OTROS LOCALES?
   PRIVATE lActFun := .F., cNomFon := "
.\imagenes\fondonegro1.bmp"  // 7 ok

   MEMVAR oBar, Omenu // ?? LOCAL

   // Porque? de nuevo? no comprendo.
   PUBLIC oImageList, oToolBar, oBa1r, oBar, Omenu // PUBLIC obar, oMenu?

   cambiaTemp(@cPatLoc) // retora correcto aqui?

   IF M->lProEje  // .T.
      MYMEN("
Error. El programa ya esta en ejecuci¢n") // retorna correcto?
      RETURN NIL
   ENDIF

   M->lProEje := .T.  // QUE HACE? LOGICAL

   Ctrl_F7 := {"
BorraMoviConcepto(cPatSis)"} // QUE HACE?

   SetResDebug( .T. )

   //  SetResCheck()
   IF FILE("
.\IMAGENES\zeruswin.ico") // PONGA EN EL DIRECTORIO DEL PROGRAMA

      DEFINE ICON oIco  FILENAME "
.\IMAGENES\zeruswin.ico"

   ELSE // SE NO EJISTE? PORQUE NO EN EL .RC/.RES?

      ...

   ENDIF

   M->cTitVenPri := HB_OEMTOANSI("
Russoft ERP. Sistema de Gesti¢n Empresarial " + ;
      "
(Versi¢n : "+m->cFecVerZer+")"+ " | "+ cCiaAct +" - "+ cCiaNom )

   DEFINE WINDOW oWnd FROM 0, 0 TO 46, 128 TITLE M->cTitVenPri            ;
      ICON oIco                                                           ;
      MENU  MenuPrincipal(oWnd)


   ACTIVATE WINDOW oWnd MAXIMIZED  ; //7133
      ON INIT ( oMetPri := MakeMetroPanelPrincipal( oWnd, oBrush ), ;
                m->oMetWin := oMetPri, ;  // m->oMetWin ?? retorna correcto?
                oMetPri:Show(),;
                oTimer := XTimers(),;
                LINEAESTADOFW(oWnd) ) //?? QUE HACE?

RETURN NIL


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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 47 guests