Re: NSTimer help
Re: NSTimer help
- Subject: Re: NSTimer help
- From: "Michael Ash" <email@hidden>
- Date: Wed, 17 Dec 2008 23:03:11 -0500
On Wed, Dec 17, 2008 at 4:05 PM, Eric Lee <email@hidden> wrote:
>
>
> Begin forwarded message:
>
>> From: Eric Lee <email@hidden>
>> Date: December 17, 2008 3:02:40 PM CST
>> To: Ken Thomases <email@hidden>
>> 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 determine if
>> something is happening
>>
>> However, even though the if statement is true, the window never closes:
>>
>> Here's the code...thanks
This code should have produced at least two warnings:
>> - (void)windowShouldClose:(id)window
>> {
>> if ([[textField stringValue] isEqualTo: @"0:00:00" || @"0.00000" ])
One on the above line:
warning: passing argument 1 of 'isEqualTo:' makes pointer from integer
without a cast
>> {
>> [mainWindow windowShouldClose:YES];
And one here:
warning: passing argument 1 of 'windowShouldClose:' makes pointer from
integer without a cast
Pay attention to those warnings! Warnings are the compiler trying to
tell you that something is wrong with your code. Fix them before you
do anything else. If you don't know how to fix them then by all means
ask the list, but it's pointless to ask why code doesn't work when it
generates warnings. Most likely, the warnings are telling you why!
Furthermore this code should have generated error messages in your
console log when it executed, if not outright crashed. Those error
messages are also telling you what's wrong. Use them to track down the
problem. Again, if you don't know how, ask the list about them, but
don't just ignore them.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden