• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTimer help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimer help


  • Subject: Re: NSTimer help
  • From: Eric Lee <email@hidden>
  • Date: Wed, 17 Dec 2008 15:19:02 -0600



Begin forwarded message:

From: Eric Lee <email@hidden>
Date: December 17, 2008 3:18:41 PM CST
To: Volker in Lists <email@hidden>
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];, should i just put return NO/YES; ?

Thanks
On Dec 17, 2008, at 3:10 PM, Volker in Lists wrote:

Hi Eric,


- (BOOL)windowShouldClose:(id)window

is the correct implementation with the method name implicating a question that is answered either YES or NO. Your method in its current form is not called, which you could have easily worked out using a single NSLog(@"I do work sometimes"); within the method.

Cheers,
Volker


Am 17.12.2008 um 22:05 schrieb Eric Lee:



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

- (void)windowShouldClose:(id)window
{
if ([[textField stringValue] isEqualTo: @"0:00:00" || @"0.00000" ]) {
[mainWindow windowShouldClose:YES];

}

else {

NSAlert *alert;
alert = [NSAlert alertWithMessageText:@"Error!" defaultButton:nil alternateButton:nil otherButton:nil informativeTextWithFormat:@"Please stop the timer."];

[alert runModal];

[mainWindow windowShouldClose:NO];
}
}

_______________________________________________

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



_______________________________________________

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


  • Prev by Date: Re: automatic table scrolling when nsarraycontroller selection changes
  • Next by Date: Re: NSTimer help
  • Previous by thread: Re: NSTimer help
  • Next by thread: Get notified of fullscreen switch
  • Index(es):
    • Date
    • Thread