Article Preview
Buy Now
COLUMN
Alarming Techniques
Using a Timer to create an Alarm Clock class
Issue: 5.4 (May/June 2007)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 38,158
Starting Page Number: 34
Article Number: 5413
Resource File(s):
5413.zip Updated: 2007-05-18 10:49:52
Related Link(s): None
Excerpt of article text...
Recently I assisted a REALbasic user on the NUG who was struggling to get a simple Alarm Clock program working. Via our correspondence, I realized he was not understanding some of the fundamentals involving the
Timer
control, so I decided that would be an excellent topic for today's lesson.On the surface, a
Timer
seems like a simple control. It does not have many features. It's invisible, so there's no user interface to worry about, and only a couple properties to set. However, it is this very simplicity which can make the control confusing.Timer Basics
If you're not familiar with the
Timer
, it's a really handy control. ATimer
simply activates everyx milliseconds. It can execute whatever code you'd like at that time, from simply checking to see if a particular key has been pressed or a state entered to handling some animation or updating a display. You can create multiple Timers that trigger at different times, if you like.
...End of Excerpt. Please purchase the magazine to read the full article.