I think you need to backup and explain exactly what your requirements are. If 
you really do need to track these timers, you will probably need an array or 
dictionary, but if these timers are all one-shot and they configure the next 
timer to execute, there seems little reason to maintain your own owning 
reference to them...

On Sep 29, 2011, at 3:06 PM, Tom Hohensee wrote:

> Yes.  What I have worked on is using an array of timers fired sequentially.  
> Each firing of the timer sets up the next one in the array.  Each new 
> addition to the array requires invalidating of the active timer and 
> reordering of the array according to times.   But i have run into problems 
> when two or more timers are set to fire at the same time. 
> 
> Tom
> 
> On Sep 29, 2011, at 4:51 PM, David Duncan wrote:
> 
>> On Sep 29, 2011, at 2:47 PM, Tom Hohensee wrote:
>> 
>>> However, I do not know wether the user will have 1 device or 100 devices.  
>>> Do I have to setup a finite amount of timers (ultimately having a limit on 
>>> the number of devices that can be added) or is there a better way?  I have 
>>> googled for a while now trying to find example code but have come up empty 
>>> (plenty of finite examples).  I see there are timer applications out there 
>>> that seem to handle an infinite number of timers.  
>> 
>> 
>> Have you looked into NSMutableArray?
>> --
>> David Duncan
>> 
>> _______________________________________________
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/tomhoh%40mac.com
>> 
>> This email sent to tom...@mac.com
> 

--
David Duncan

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to