On Wed, Dec 17, 2008 at 4:05 PM, Eric Lee <ericlee1...@gmail.com> wrote:
>
>
> Begin forwarded message:
>
>> From: Eric Lee <ericlee1...@gmail.com>
>> Date: December 17, 2008 3:02:40 PM CST
>> To: Ken Thomases <k...@codeweavers.com>
>> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to