[Gambas-user] Timer in console projects - help the stupid, please
Stefano Palmeri
rospolosco at ...152...
Thu Jan 25 18:30:20 CET 2007
Alle 18:10, giovedì 25 gennaio 2007, José Luis Redrejo ha scritto:
> It should be:
>
> PUBLIC hDaemonTimer AS Timer
>
> PUBLIC SUB Main()
>
> hDaemonTimer = NEW Timer as Timer1
> hDaemonTimer.Delay = 1000
> hDaemonTimer.Enabled = TRUE
>
> END
>
> PUBLIC SUB Timer1_Timer()
>
> PRINT "hello world!"
>
> END
>
>
> ANytime you declare a new object that raises events, you shoud use the
> syntax:
> object=New Class as "whatever"
> and the events are received at whatever_event subs.
>
> Regards.
>
Sorry, your code doesn't work.
I'm talking about a *only console* project.
Who's next?
Regards,
Stefano Palmeri
>
> 2007/1/25, Stefano Palmeri <rospolosco at ...152...>:
> >
> > Hi, all.
> >
> > I'm working on a *console only* project. The problem is that I'm not able
> > to make the Timer class working. This is an example code:
> >
> >
> > PUBLIC hDaemonTimer AS Timer
> >
> > PUBLIC SUB Main()
> >
> > hDaemonTimer = NEW Timer
> > hDaemonTimer.Delay = 1000
> > hDaemonTimer.Enabled = TRUE
> >
> > END
> >
> > PUBLIC SUB hDaemonTimer_Timer()
> >
> > PRINT "hello world!"
> >
> > END
> >
> >
> > I would expect a printing to stdout every 1 second, but I get
> > nothing on console. So, please, help the stupid and tell me what's wrong.
> > Gambas2 1.9.47
> >
> > Thank you all.
> >
> > Stefano Palmeri
> >
> >
> >
> >
> >
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your
> > opinions on IT & business topics through brief surveys - and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list