Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Fritzables

macrumors regular
Original poster
May 6, 2011
149
1
Brisbane AUSTRALIA
G'Day To All,

I want to write a logging utility to keep track of contacts I make using Ham radio using Xcode and supporting Mac.

The requirement will to have a digital clock placed in one of the panes. This is to read system time converted to UTC.

I am guessing I use NSDate as the object??

Lastly, I assume that code need to be written so that the clock I create stays in a loop so it continually updates. Typically, where would one place such a loop?

Pete
 

jiminaus

macrumors 65816
Dec 16, 2010
1,449
1
Sydney
Quickly before the final quarter of the AFL grand final starts.... :)

You can use either the trio of NSDate/NSCalendar/NSDateComponents or the duo of NSDate/NSDateFormatter depending on how you implements your clock view. See the Date and Time Programming Guide.

Running loops is an anti-pattern in event-driven programming like Cocoa. Instead use an NSTimer to invoke a method that updates the clock view at intervals. See the Timer Programming Topics.
 

Fritzables

macrumors regular
Original poster
May 6, 2011
149
1
Brisbane AUSTRALIA
G'Day Jimi,

Just catching the end of it now - I heard that it was a pretty close game. Eddie doesn't look happy so I guess Geelong won.

As long as Manly get their arsses kicked tomorrow.... that's all that matters !!

Thanks for the assistance.

Pete
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.