realbasic-nug
[Top] [All Lists]

Re: Timer by Code?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Timer by Code?
From: Frank Condello <developer at chaoticbox dot com>
Date: Thu, 31 May 2007 14:25:36 -0400
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <d2e2da307c84eba068f56e7a62d79194 at proaxis dot com> <2D884F6B-2C2E-439B-A282-FCE98D64928E at chaoticbox dot com> <5785E78E-8BD0-4D06-BC8C-1B805637E75A at austin-home dot com> <476D5577-CFFB-4FC6-8305-0F99D2C533EB at chaoticbox dot com> <8D624817-C60E-4201-9BFE-9E2925DED542 at comcast dot net>
On 31-May-07, at 8:07 AM, Karen wrote:
>
> On May 31, 2007, at 3:21 AM, Frank Condello wrote:
>
>> Though I suppose your workaround might not work out so
>> well if you need the owning class to handle a bunch of different
>> timer events.
>
> Having done the same thing about RB 3.5  the answer to that is
> simple. You can pass an optional parameter to the owned timer
> indicating the action to be taken which is passed back when the timer
> calls the method. Then just use a select case statement in the
> callback method.

That's exactly what I meant by "not work out so well" ;) One delegate  
handling multiple events can be harder to maintain than using  
multiple subclasses in some situations, but it really comes down to  
coding style and personal preference most of the time.

Frank.
<http://developer.chaoticbox.com/>

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


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