Error in class tget fwh2304

Error in class tget fwh2304

Postby ralph » Fri Jul 14, 2023 12:16 am

I just updated to fwh2304
I got this error:
Error description: Error BASE/1102 Argument error: UPPER
Args:
[ 1] = N 0

Stack Calls
===========
Called from: => UPPER( 0 )
Called from: .\source\classes\TGET.PRG => TGET:INITIATE( 1316 )
Called from: => __OBJSENDMSG( 0 )
Called from: => HB_EXECFROMARRAY( 0 )
Called from: .\source\function\HARBOUR.PRG => OSEND( 300 )
Called from: => HB_EXECFROMARRAY( 0 )
Called from: .\source\function\HARBOUR.PRG => ASEND( 278 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 871 )

This small test works fine in fwh1709
Code: Select all  Expand view

#include "FiveWin.ch"

function Main()
 local oDlg, oCbx, oChk
 local cStatus, cOutPort, cPrnName
 local oGet := array(8)
 local oSay := array(7)
 local nModo := 1, nMT := 0, nML := 0, nMB := 0, nMR := 0
 local nLinP := 60, lPreview := .f.
 local cImpr := space(60)
 local oBtnOk, oBtnCn, oBtnSetup

 DEFINE DIALOG oDlg NAME "IMPRIMIR"

 cOutPort := pad('',100)
 cImpr := "Mi printer"
 lIsLaser := .t.
 lToFile  := .t.

 nMT := 0 ; nMB := 66 ; nModo := 2 ; nLinP := 66

 REDEFINE SAY oCbx VAR cImpr ID 101 OF oDlg

 REDEFINE BTNBMP oBtnSetup ID 150 OF oDlg  ;
   RESOURCE "PRINTER" NOBORDER TOOLTIP "Seleccionar Impresora"

 cStatus := "En espera"

 REDEFINE SAY oSay[1] VAR cStatus ID 102 OF oDlg UPDATE
 REDEFINE GET oSay[2] VAR cOutPort ID 103 OF oDlg UPDATE PICTURE "@!"

 REDEFINE SAY oSay[3] ID 21 OF oDlg PROMPT "Márgenes (en lineas)"

 REDEFINE CHECKBOX lToFile ID 104 OF oDlg UPDATE ;

 REDEFINE RADIO oGet[1] VAR nModo ID 105, 106 OF oDlg

 REDEFINE GET oGet[2] VAR nLinP ID 107 OF oDlg PICTURE "999" ;
          VALID nLinP <= 140

 REDEFINE CHECKBOX oGet[3] VAR lPreview ID 113 OF oDlg UPDATE
 REDEFINE GET oGet[4] VAR nMT ID 109 OF oDlg
 REDEFINE GET oGet[5] VAR nML ID 110 OF oDlg
 REDEFINE GET oGet[6] VAR nMR ID 111 OF oDlg
 REDEFINE GET oGet[7] VAR nMB ID 112 OF oDlg

  REDEFINE BUTTON oBtnOk ID 1 OF oDlg ACTION ( oDlg:End() ) ;
  MESSAGE "Iniciar Impresion"

 REDEFINE BUTTON oBtnCn ID 2 OF oDlg ACTION  ( oDlg:End()) ;
  MESSAGE "Cancelar Cambios" CANCEL

 ACTIVATE DIALOG oDlg CENTERED

return nil

// RESOURCE
#include "..\include\winapi.ch"

#ifndef __64__
  1 24 "\WinXP\WindowsXP.Manifest"
#endif

#ifdef __64__
   1 24 "\WinXP\WindowsXP.Manifest64"
#endif

IMPRIMIR DIALOG DISCARDABLE 28, 31, 293, 185
STYLE WS_POPUP|DS_MODALFRAME|DS_3DLOOK|WS_CAPTION
CAPTION "Control de Impresión"
FONT 8, "Arial"
{
  CONTROL "Impresora", 10, "Button", BS_GROUPBOX, 2, 3, 289, 61
  CONTROL "&Nombre :", 11, "Static", SS_RIGHT|WS_GROUP, 6, 17, 38, 12
  CONTROL "", 101, "Edit", 0x00000000, 49, 17, 210, 12
  CONTROL "", 150, "Button", 0x00000000, 267, 12, 15, 12
  CONTROL "Estado :", 12, "Static", SS_RIGHT|WS_GROUP, 6, 32, 38, 12
  CONTROL "", 102, "Static", 0x00000000, 49, 32, 49, 12
  CONTROL "Puerto :", 13, "Static", SS_RIGHT|WS_GROUP, 6, 47, 38, 12
  CONTROL "", 103, "Edit", ES_AUTOHSCROLL|WS_BORDER, 49, 47, 153, 12
  CONTROL " Imprimir en &Archivo", 104, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 207, 47, 79, 12
  CONTROL "", 14, "Button", BS_GROUPBOX, 2, 72, 289, 21
  CONTROL "Modo &Texto (matriciales)", 105, "Button", BS_RADIOBUTTON|WS_TABSTOP, 10, 79, 134, 10
  CONTROL "Modo &Gráfico (Laser/Inkjet)", 106, "Button", BS_RADIOBUTTON|WS_TABSTOP, 145, 79, 134, 11
  CONTROL "", 15, "Button", BS_GROUPBOX, 2, 93, 131, 27
  CONTROL "Líneas por hoja (max)", 16, "Static", WS_GROUP, 11, 103, 89, 10
  CONTROL "", 107, "Edit", ES_RIGHT|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 105, 103, 22, 11
  CONTROL "Previsualizar", 113, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 8, 131, 104, 12
  CONTROL "Margenes", 21, "Button", BS_GROUPBOX, 148, 93, 143, 59
  CONTROL "Sup", 17, "Static", WS_GROUP, 191, 104, 13, 10
  CONTROL "", 109, "Edit", ES_RIGHT|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 212, 102, 30, 12
  CONTROL "Izq", 18, "Static", WS_GROUP, 176, 120, 13, 10
  CONTROL "", 110, "Edit", ES_RIGHT|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 193, 119, 30, 12
  CONTROL "", 111, "Edit", ES_RIGHT|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 236, 119, 30, 12
  CONTROL "Der", 19, "Static", WS_GROUP, 270, 120, 13, 10
  CONTROL "Inf", 20, "Static", WS_GROUP, 194, 137, 13, 10
  CONTROL "", 112, "Edit", ES_RIGHT|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 212, 136, 30, 12
  CONTROL "&Aceptar", IDOK, "Button", WS_TABSTOP, 174, 172, 46, 12
  CONTROL "&Salir", IDCANCEL, "Button", WS_TABSTOP, 226, 172, 46, 12
  CONTROL "No mostrar fecha/hora en la impresión", 115, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 146, 154, 146, 12
}

 

Any suggestion ?
Ralph del Castillo
Lima PERU
Fwh 24.07, xHb123_10193, MySQL 5.5, BCC 7.3
User avatar
ralph
 
Posts: 79
Joined: Fri Nov 18, 2005 11:15 pm
Location: Lima - PERU

Re: Error in class tget fwh2304

Postby karinha » Fri Jul 14, 2023 3:05 am

Buenas noches. Compara y encuentra los ERRORES. Compare and find the ERRORS.


Code: Select all  Expand view

C:\FWH..\SAMPLES\RALPH.PRG

#include "FiveWin.ch"

#Define CLR_MSPURPLE   nRGB( 0,   120, 215 ) //-> Purpura.
#Define CLR_MSRED      nRGB( 232,  17,  35 )
#Define CLR_MSGRAY     nRGB( 229, 229, 229 )

STATIC lIsLaser, lToFile, nModo

FUNCTION Main()

   LOCAL oDlg, oCbx, oChk, oRadio, oFont
   LOCAL cStatus, cOutPort, cPrnName
   LOCAL aGet := Array( 10 )
   LOCAL oSay := Array( 10 )
   LOCAL nMT := 0, nML := 0, nMB := 0, nMR := 0
   LOCAL nLinP := 60, lPreview := .F.
   LOCAL cImpr := Space( 60 )
   LOCAL oBtnOk, oBtnCn, oBtnSetup

   cStatus  := "En espera"
   cOutPort := Pad( '', 100 )
   cImpr    := "Mi printer"
   lIsLaser := .T.
   lToFile  := .T.
   nMT      := 0 ; nMB := 66 ; nModo := 2 ; nLinP := 66
   nModo    := 1

   DEFINE FONT oFont  NAME "Ms Sans Serif"  SIZE 00, -10 // BOLD

   DEFINE DIALOG oDlg NAME "IMPRIMIR" FONT oFont COLOR CLR_MSGRAY, CLR_WHITE ;
      TRANSPARENT

   // oDlg:lHelpIcon := .T.

   // SAYS:

   REDEFINE SAY oCbx VAR cImpr ID 101 OF oDlg UPDATE                  ;
      COLOR CLR_MSPURPLE, CLR_WHITE TRANSPARENT

   REDEFINE SAY oSay[ 1 ] VAR cStatus ID 102 OF oDlg UPDATE           ;
      COLOR CLR_MSPURPLE, CLR_WHITE TRANSPARENT

   REDEFINE SAY oSay[ 2 ] ID 21 OF oDlg PROMPT "Márgenes (en lineas)" ;
      UPDATE COLOR CLR_MSPURPLE, CLR_WHITE TRANSPARENT

   // RADIOS Y CHECKS

   REDEFINE CHECKBOX lToFile ID 104 OF oDlg UPDATE

   REDEFINE RADIO oRadio VAR nModo ID 105, 106 OF oDlg UPDATE

   // GETS:

   IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
      Set( _SET_INSERT, ! Set( _SET_INSERT ) )
   ENDIF

   REDEFINE GET aGet[1] VAR cOutPort ID 103 OF oDlg PICTURE "@!"      ;
      COLOR CLR_MSPURPLE, CLR_WHITE

   REDEFINE GET aGet[2] VAR nLinP ID 107 OF oDlg PICTURE "999"        ;
      VALID nLinP <= 140 COLOR CLR_MSPURPLE, CLR_WHITE

   REDEFINE GET aGet[3] VAR nMT ID 109 OF oDlg PICTURE "999"          ;
      COLOR CLR_MSPURPLE, CLR_WHITE

   REDEFINE GET aGet[4] VAR nML ID 110 OF oDlg PICTURE "999"          ;
      COLOR CLR_MSPURPLE, CLR_WHITE

   REDEFINE GET aGet[5] VAR nMR ID 111 OF oDlg  PICTURE "999"         ;
      COLOR CLR_MSPURPLE, CLR_WHITE

   REDEFINE GET aGet[6] VAR nMB ID 112 OF oDlg  PICTURE "999"         ;
      COLOR CLR_MSPURPLE, CLR_WHITE

   // CHECK:
   REDEFINE CHECKBOX oChk VAR lPreview ID 113 OF oDlg UPDATE  ;
      COLOR CLR_MSPURPLE, CLR_WHITE

   // botones:

   REDEFINE BTNBMP oBtnSetup ID 150 OF oDlg RESOURCE "PRINTER" NOBORDER ;
      TOOLTIP "Seleccionar Impresora"

   REDEFINE BUTTON oBtnOk ID 1 OF oDlg ACTION ( oDlg:End() )

   oBtnOk:cToolTip := "Iniciar Impresion"

   REDEFINE BUTTON oBtnCn ID 2 OF oDlg ACTION ( oDlg:End() ) CANCEL

   oBtnCn:cToolTip := "Cancelar Cambios"

   ACTIVATE DIALOG oDlg CENTERED

   IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
      Set( _SET_INSERT, ! Set( _SET_INSERT ) )
   ENDIF

   oFont:End()

RETURN NIL
 


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

Re: Error in class tget fwh2304

Postby nageswaragunupudi » Fri Jul 14, 2023 5:43 am

Called from: => UPPER( 0 )
Called from: .\source\classes\TGET.PRG => TGET:INITIATE( 1316 )


Please remove the style ES_UPPERCASE for all Gets that are not character values in the RC file
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Error in class tget fwh2304

Postby ralph » Sat Jul 15, 2023 3:28 pm

Thanks Rao, now is working fine
Ralph del Castillo
Lima PERU
Fwh 24.07, xHb123_10193, MySQL 5.5, BCC 7.3
User avatar
ralph
 
Posts: 79
Joined: Fri Nov 18, 2005 11:15 pm
Location: Lima - PERU


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 93 guests