Re: Growl, NSTimer, and Launching Application help!
Re: Growl, NSTimer, and Launching Application help!
- Subject: Re: Growl, NSTimer, and Launching Application help!
- From: Jens Alfke <email@hidden>
- Date: Mon, 21 Jul 2008 13:47:29 -0700
On 21 Jul '08, at 12:07 PM, Eric Lee wrote:
I've fully implemented growl, but how can you implement growl so
that you can disable and enable growl by unchecking/checking a
checkbox because too many small windows appearing might get a little
annoying.
Use NSUserDefaults to store a boolean preference. Check that pref
before putting up a Growl notification. Have a preference panel with a
checkbox that's bound to that setting in the user defaults controller.
The stopwatch application launches from January 1st, 2001, because I
implemented
-timeIntervalSinceReferenceDate, because -timeIntervalSinceDate, and
-timeIntervalSinceNow, wouldn't work. I don't know how to change the
application so that it WILL work with those two. Basically, how do I
change my code so that when I start the timer, it'll start from 0,
and then go up?
If you want to know how many seconds have elapsed since it started,
then call [NSDate date] when you start, store that value in an
instance variable like _date, and then call - [_date
timeIntervalSinceNow]. (The "-" is needed otherwise you get a negative
number.)
For some reason, when I quit the application, and then click on the
icon on the dock, it won't open another window. How do you fix this?
Did you _quit_ the app, or did you just close its window? Closing the
window won't quit the app unless you implement the right application
delegate method (something like terminatesWhenLastWindowClosed), or
alternately call [NSApp terminate] when notified that the window's
been closed.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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