FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour tGet Númerico sin el "0" Inicial ( Solucionado )
Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM
tGet Númerico sin el "0" Inicial ( Solucionado )
Posted: Sat Aug 27, 2011 04:41 PM

Saludos Amigos,

Tengo una aplicacion ya terminada y el cliente me ha pedido que en los get
numericos el "0" inicial no este, osea que el campo este en blanco, pero que
sea númerico.
Saludos,



Pablo Alberto Vidal

/*

------------------------------------------------------

Harbour 3.2.0, Fivewin 17.02, BCC7

------------------------------------------------------

*/
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: tGet Númerico sin el "0" Inicial
Posted: Sat Aug 27, 2011 08:27 PM

Podrias usar la VAR de tipo char y validar que lo entrado sea un valor numerico, aunque con @Z deberia de funcionarte, saludos. :shock:

Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM
Re: tGet Númerico sin el "0" Inicial
Posted: Sat Aug 27, 2011 09:10 PM

El asunto es que los gets estan asociados a una data en Mysql con tDolphin.
y el "@Z" lo probe con habour y xHarbour y no funciona... y tampoco funciona en modo consola.

Saludos,



Pablo Alberto Vidal

/*

------------------------------------------------------

Harbour 3.2.0, Fivewin 17.02, BCC7

------------------------------------------------------

*/
Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM
Re: tGet Númerico sin el "0" Inicial ( Solucionado )
Posted: Sun Aug 28, 2011 06:33 PM
Code (fw): Select all Collapse
  
METHOD DispText() CLASS TGet

  if ::lPassword .and. ::oGet:Type == "C"
      #ifdef __CLIPPER__
         SetWindowText( ::hWnd, Replicate( "*", Len( Trim( ::oGet:buffer ) ) ) )
      #else
         SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 149 ), "*" ),;
                                           Len( Trim( ::oGet:buffer ) ) ) )
      #endif
   ElseIf ::oGet:Type == "N" .and. Val( ::oGet:buffer ) == 0 // Añadir estas lineas
     SetWindowText( ::hWnd, " " )                            // y esta otra y muerto el pollo
   else
     SetWindowText( ::hWnd, If( ! Empty( ::cCueText );
                                  .and. Empty( ::oGet:VarGet() );
                                  .and. GetFocus() != ::hWnd,;  // Focus is outside
                                   "", ::oGet:buffer ) )
   endif

return nil
Saludos,



Pablo Alberto Vidal

/*

------------------------------------------------------

Harbour 3.2.0, Fivewin 17.02, BCC7

------------------------------------------------------

*/

Continue the discussion