Clase TTimer

Clase TTimer

Postby mastintin » Tue Aug 31, 2010 7:24 am

He visto que no están implementados los timer como clase fivemac , asi que he escrito estas lineas para que se puedan usar con la sintaxis de clase .Es un primer acercamiento ya que creo que no es "compatible" con fivewin al 100%. Falta implementar los includes para que sean parecidos a los de fivewin .
Code: Select all  Expand view


#include "FiveMac.ch"

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

CLASS TTimer

   DATA   bAction
   DATA   lActive
   DATA   nInterval
   DATA   lRepeat
   DATA   hWnd
   DATA   Cargo
   DATA   hWndOwner

   METHOD New( nInterval, bAction, oWnd ) CONSTRUCTOR

  // METHOD Activate()

  // METHOD DeActivate() INLINE ::lActive := .f.

   METHOD End() INLINE  TimerEnd(::hWnd )

ENDCLASS

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

METHOD New( nInterval, bAction, oWnd ) CLASS TTimer

   DEFAULT nInterval := 18, bAction := { || nil }
     
   oWnd:bOnTimer:= bAction
   
   ::hWndOwner := oWnd:hWnd
   
   ::hWnd := TimerCreate( nInterval ,::hWndOwner )
   
   ::nInterval:= nInterval
   ::bAction  := bAction
   ::lActive  := .t.
     
return Self

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








 
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: Clase TTimer

Postby Antonio Linares » Tue Aug 31, 2010 9:47 am

Manuel,

Gracias! :-)

Vamos a publicar un nuevo build de FiveMac cuanto antes :-)
regards, saludos

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


Return to FiveMac / FivePhone (iPhone, iPad)

Who is online

Users browsing this forum: No registered users and 3 guests