Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 16 in printed book and digital formats -- plus a one-year subscription (beginning with 17.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 5.4

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):

Download Icon 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. A Timer simply activates every x 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.