Page 1 of 1

tTime() bug

Posted: Wed Feb 15, 2006 3:15 pm
by ralph
Antonio:

esta linea funciona bien hasta FWH 2.6 + xHb 09950

oTime1 := TTime():System()


Pero al compilarlo con FWH 2.7 (jan) + xHb 09951
me da el siguiente error en tiempo de ejecucion :

Application
===========
Path and name: C:\DemoSistemas\Protwin\gestwinx.Exe (32 bits)
Size: 3,494,400 bytes
Time from start: 0 hours 2 mins 38 secs
Error occurred at: 15/02/2006, 09:26:30
Error description: Error BASE/1605 Invalid self: SYSTEM
Args:
[ 1] = O Object
[ 2] = U

Stack Calls
===========
Called from: TIME.PRG => TTIME:SYSTEM(0)
Called from: costprom.prg => COSTPROM(22)
Called from: => (b)BUILDMENU(390)
Called from: MENU.PRG => TMENU:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:COMMAND(0)
Called from: MDIFRAME.PRG => TMDIFRAME:COMMAND(0)
Called from: WINDOW.PRG => TMDIFRAME:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: wgest.prg => MAIN(182)


Puedes ayudarme?

Ralph

Posted: Wed Feb 15, 2006 6:13 pm
by Antonio Linares
Ralph,

Modifica la Clase TTime para que el método New y System devuelvan Self:

...

return Self // en vez de return nil

Con ese cambio, samples\TestTim2.prg funciona correctamente con Harbour/xharbour.

Posted: Wed Feb 15, 2006 8:35 pm
by ralph
Gracias Antonio:

funciono!

Ralph