realbasic-nug
[Top] [All Lists]

Re: Timer question

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Timer question
From: Hans-Georg <pantarei at mac dot com>
Date: Mon, 27 Mar 2006 14:53:02 +0200
Cc:
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <4427CB62 dot 2000203 at schani dot com> <ACD1839A-EBC9-47B9-9666-AFE17CB9F6CC at mac dot com> <4427D24E dot 10009 at schani dot com> <C356CD9F-2ECF-4027-855F-4D000CDFC431 at mac dot com>
Am 27.03.2006 um 14:43 schrieb Hans-Georg:

1. In the IDE choose the Menu Project:Add:Class.
2. Change the super of this new class to Timer.
3. Change the name of this class to myTimer.
4. Doubleclick the class icon. In the Event Handlers you find the Action event. Put your code in this event, e.g. "Beep"
5.

t  As New myTimer
t.Mode = 5000
t.Enabled = true

should work then.

I anticipate the next problem: If t is a local variable, it will go out of scope at the method's end, and it will be released before the action event could even fire. So you have to make t a property of a persistent class, window etc.

Hans-Georg
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>