Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Help me complete this timer!

Help me complete this timer!
Thread Tools
Forum Regular
Join Date: Feb 2005
Status: Offline
Reply With Quote
Apr 22, 2006, 04:15 PM
 
So my application is at standstill right now and here is where I'm troubled. (Taking up Cocoa as a hobby, cranking away at my first app)

I have a class called Level and in that class are 4 ints. I have a NSTableView in connection with a NSArrayController and using bindings I can manipulate that date in tha table view (add and remove items).

The first int in my class is designated for time and for now just going to take as minutes.

Once the users adds all the information they will start a action and the application will start at the first item in the array, see how many minutes and run a countdown while display the other information in the class. Once the time is up it will go to the next item in the array and start over with the new length designated in the field.

I assume I want to take the number, convert it to seconds, initiate a NSTimer and each time the timer fires I will run another method that will subtract a second from the timer, convert it to a string and display it and keep doing that until the time is up and then once it reaches zero jump to the next item in the array and do the same thing.

I just don't know where to start this in code as well as how I access the data held in my NSArrayController.

Any tips or even some example code to get me started?

Thanks!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:37 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2