Re: Displaying time

2008-08-22 Thread Ron Fleckner
On 23/08/2008, at 1:18 AM, Michael Ash wrote: On Fri, Aug 22, 2008 at 8:51 AM, Ron Fleckner <[EMAIL PROTECTED]> wrote: Is there a way to update the time without using an NSTimer? I'd like my clock to be synchronised with the menu bar clock. Maybe this isn't a Cocoa question. Thanks for

Re: Displaying time

2008-08-22 Thread Michael Ash
On Fri, Aug 22, 2008 at 8:51 AM, Ron Fleckner <[EMAIL PROTECTED]> wrote: > Is there a way to update the time without using an NSTimer? I'd like my > clock to be synchronised with the menu bar clock. Maybe this isn't a Cocoa > question. Thanks for your answers. It's pretty simple. Use a *non* re

Re: Displaying time

2008-08-22 Thread Negm-Awad Amin
Am Fr,22.08.2008 um 16:15 schrieb Graham Cox: On 23 Aug 2008, at 12:04 am, Negm-Awad Amin wrote: This is what a analog PLL do, when it loads/unloads a ramp. Analogue PLL design (Audio to GHz RF) were my bread-and-butter for many years, so do be careful not to teach your granny to suck e

Re: Displaying time

2008-08-22 Thread Graham Cox
On 23 Aug 2008, at 12:04 am, Negm-Awad Amin wrote: This is what a analog PLL do, when it loads/unloads a ramp. Analogue PLL design (Audio to GHz RF) were my bread-and-butter for many years, so do be careful not to teach your granny to suck eggs here ;-) If the system is busy, every tim

Re: Displaying time

2008-08-22 Thread Negm-Awad Amin
Sorry for sending the responds solely to Graham: Am Fr,22.08.2008 um 15:53 schrieb Graham Cox: On 22 Aug 2008, at 11:39 pm, Negm-Awad Amin wrote: I think, that a higher event-frequency is not neccessary. He should use an interval of close to one second (something like 0.99 seconds). In hi

Re: Displaying time

2008-08-22 Thread Negm-Awad Amin
Am Fr,22.08.2008 um 16:00 schrieb Graham Cox: On 22 Aug 2008, at 11:54 pm, Negm-Awad Amin wrote: This is not ugly, but the starting point for a software PLL. Well, there's no "loop" to phase lock here. This was the reason for me, to write: "starting point". Look to my newer answer. Th

Re: Displaying time

2008-08-22 Thread Ron Fleckner
On 22/08/2008, at 11:28 PM, Graham Cox wrote: On 22 Aug 2008, at 10:55 pm, Ron Fleckner wrote: Sorry, my question was very badly put. I've already apologised to two other answerers. I should have said: Is there a better way - other than using an NSTimer - to update the clock? That is,

Re: Displaying time

2008-08-22 Thread Graham Cox
On 22 Aug 2008, at 11:54 pm, Negm-Awad Amin wrote: This is not ugly, but the starting point for a software PLL. Well, there's no "loop" to phase lock here. The PLL analogy might hold up if you used your timer to measure the interval between changes of the clock, then use that to change t

Re: Displaying time

2008-08-22 Thread Negm-Awad Amin
Am Fr,22.08.2008 um 15:52 schrieb Thomas Davie: On 22 Aug 2008, at 15:47, Negm-Awad Amin wrote: Am Fr,22.08.2008 um 15:45 schrieb Thomas Davie: Using a timer isn't too bad. Running at two updates per second should be acceptable since you're sampling at twice the highest "event" frequ

Re: Displaying time

2008-08-22 Thread Graham Cox
On 22 Aug 2008, at 11:39 pm, Negm-Awad Amin wrote: I think, that a higher event-frequency is not neccessary. He should use an interval of close to one second (something like 0.99 seconds). In his timer method he simply waits in a loop for the "tick tack" and displays the result. So he will

Re: Displaying time

2008-08-22 Thread Thomas Davie
On 22 Aug 2008, at 15:47, Negm-Awad Amin wrote: Am Fr,22.08.2008 um 15:45 schrieb Thomas Davie: Using a timer isn't too bad. Running at two updates per second should be acceptable since you're sampling at twice the highest "event" frequency. You might want to go a bit faster and maybe

Re: Displaying time

2008-08-22 Thread Negm-Awad Amin
Am Fr,22.08.2008 um 15:45 schrieb Thomas Davie: Using a timer isn't too bad. Running at two updates per second should be acceptable since you're sampling at twice the highest "event" frequency. You might want to go a bit faster and maybe at a slightly odd multiple of one second to make

Re: Displaying time

2008-08-22 Thread Thomas Davie
Using a timer isn't too bad. Running at two updates per second should be acceptable since you're sampling at twice the highest "event" frequency. You might want to go a bit faster and maybe at a slightly odd multiple of one second to make sure you don't end up with a constant half-second

Re: Displaying time

2008-08-22 Thread Negm-Awad Amin
Am Fr,22.08.2008 um 15:28 schrieb Graham Cox: On 22 Aug 2008, at 10:55 pm, Ron Fleckner wrote: Sorry, my question was very badly put. I've already apologised to two other answerers. I should have said: Is there a better way - other than using an NSTimer - to update the clock? That is,

Re: Displaying time

2008-08-22 Thread Graham Cox
On 22 Aug 2008, at 10:55 pm, Ron Fleckner wrote: Sorry, my question was very badly put. I've already apologised to two other answerers. I should have said: Is there a better way - other than using an NSTimer - to update the clock? That is, how does the system clock do it? I think now

Re: Displaying time

2008-08-22 Thread Ron Fleckner
On 22/08/2008, at 10:38 PM, Gregory Weston wrote: Ron Fleckner wrote: I want to display the current time in a full screen window. I'm making my computer into a digital clock (for my own use). I've done it by using NSCalendarDate and extracting the hours, minutes, and seconds, formatting a s

Re: Displaying time

2008-08-22 Thread Ron Fleckner
On 22/08/2008, at 8:32 PM, Nathan Kinsinger wrote: On Aug 22, 2008, at 12:59 AM, Ron Fleckner wrote: Hi, I want to display the current time in a full screen window. I'm making my computer into a digital clock (for my own use). I've done it by using NSCalendarDate and extracting the ho

Re: Displaying time

2008-08-22 Thread Gregory Weston
Ron Fleckner wrote: I want to display the current time in a full screen window. I'm making my computer into a digital clock (for my own use). I've done it by using NSCalendarDate and extracting the hours, minutes, and seconds, formatting a string and displaying it. I use an NSTimer to update

Re: Displaying time

2008-08-22 Thread Graham Cox
On 22 Aug 2008, at 4:59 pm, Ron Fleckner wrote: My question is: Is there a better way to display what is essentially the same as the menu bar clock? I think only you can really answer that - after all you are the one making the clock app. What's "better" for you? Big digital 7-segment d

Re: Displaying time

2008-08-22 Thread Nathan Kinsinger
On Aug 22, 2008, at 12:59 AM, Ron Fleckner wrote: Hi, I want to display the current time in a full screen window. I'm making my computer into a digital clock (for my own use). I've done it by using NSCalendarDate and extracting the hours, minutes, and seconds, formatting a string and d