Re: NSTimer help

2008-12-20 Thread Rob Keniger
On 18/12/2008, at 2:20 PM, Andrew Merenbach wrote: Is there a reason to use it in the case that one might instead use - isEqual: or, as was discussed in a recent thread, -isEqualToString: (which was stated, if I recall correctly, to be optimized for speed in the case of strings)? Apologie

Re: NSTimer help

2008-12-17 Thread Andrew Merenbach
On Dec 17, 2008, at 8:03 PM, Michael Ash wrote: - (void)windowShouldClose:(id)window { if ([[textField stringValue] isEqualTo: @"0:00:00" || @"0.0" ]) One on the above line: warning: passing argument 1 of 'isEqualTo:' makes pointer from integer without a cast Please accept my p

Re: NSTimer help

2008-12-17 Thread Michael Ash
On Wed, Dec 17, 2008 at 4:05 PM, Eric Lee wrote: > > > Begin forwarded message: > >> From: Eric Lee >> Date: December 17, 2008 3:02:40 PM CST >> To: Ken Thomases >> Subject: Re: NSTimer help >> >> Thanks...i hadn't realized there was a

Re: NSTimer help

2008-12-17 Thread Andrew Farmer
On 17 Dec 08, at 13:22, Ken Thomases wrote: if ([[textField stringValue] isEqualTo: @"0:00:00" || @"0.0" ]) { What's up with the above line? First, you should be careful about which isEqual... method you use. -isEqual: is a generic method for comparing any two objects. Since you kn

Re: NSTimer help

2008-12-17 Thread Ken Thomases
On Dec 17, 2008, at 3:02 PM, Eric Lee wrote: Thanks...i hadn't realized there was a - (void)windowShouldClose..but now I have another problem. Well, there isn't. There's a -(BOOL)windowShouldClose:. Note the return type. Also note that -windowShouldClose: is invoked by -performClose: bu

Re: NSTimer help

2008-12-17 Thread Eric Lee
Begin forwarded message: From: Eric Lee Date: December 17, 2008 3:18:41 PM CST To: Volker in Lists Subject: Re: NSTimer help Ah...thanks I had first started out with -(void)windowWillClose..and I guess I just forgot to change it.. Also, instead of [mainWindow windowShouldClose:NO/YES

Re: NSTimer help

2008-12-17 Thread Volker in Lists
times"); within the method. Cheers, Volker Am 17.12.2008 um 22:05 schrieb Eric Lee: Begin forwarded message: From: Eric Lee Date: December 17, 2008 3:02:40 PM CST To: Ken Thomases Subject: Re: NSTimer help Thanks...i hadn't realized there was a - (void)windowShouldClose..but now

Re: NSTimer help

2008-12-17 Thread Eric Lee
Begin forwarded message: From: Eric Lee Date: December 17, 2008 3:02:40 PM CST To: Ken Thomases Subject: Re: NSTimer help Thanks...i hadn't realized there was a - (void)windowShouldClose..but now I have another problem. I have implemented an if/else statement so that I can determi

Re: NSTimer help

2008-12-17 Thread Ken Thomases
On Dec 17, 2008, at 11:23 AM, Eric Lee wrote: I have an application, and when I exit the window, the timer doesn't stop, so the application freezes. That's very unclear. What do you mean by "exit" a window? "The timer"? Which timer? Why would you expect a timer to stop when you exit (

Re: NSTimer help

2008-12-17 Thread Randall Meadows
On Dec 17, 2008, at 10:23 AM, Eric Lee wrote: I have an application, and when I exit the window, the timer doesn't stop, so the application freezes. Is there something similar to -(void)awakeFromNib but for stopping a timer when a window closes? You can register any object to listen for