Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Help > How to make a f...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 9 Topic 3683 of 3812
Post > Topic >>

How to make a fla****ng light?

by Jim <jim@[EMAIL PROTECTED] > Apr 1, 2008 at 10:40 AM

In my ongoing attempt to learn Cocoa my next wee project is going to be a
'is the internet up?' type app. Basically it will send a single ping
packet
to three addresses once every n-seconds (say 120) and *****s the results.

That part isn't a problem.

As part of the results I want a graphic of a fla****ng LED. Red for
'Internet
is down', green for 'Internet is up'. My question is this: how do I make
it
flash? The method I'm considering is to have an NSTimer that fires every 2
seconds and calls a method that toggles the graphic between whatever two
of
the three graphics are appropriate - RedLED on, GreenLED on, LED off.

Or is there a better way?

Many thanks.

Jim
-- 
http://www.ursaMinorBeta.co.uk
"When one of the local cats, an especially fluffy creature with a vast
tail, rushed down the street towards me the other day, mewing delightedly,
I have to admit it was probably shouting 'HAZ CHEZBURGR?' " - Bella, ucsm
 




 9 Posts in Topic:
How to make a flashing light?
Jim <jim@[EMAIL PROTEC  2008-04-01 10:40:12 
Re: How to make a flashing light?
Gregory Weston <uce@[E  2008-04-01 06:07:13 
Re: How to make a flashing light?
Jim <jim@[EMAIL PROTEC  2008-04-01 11:15:10 
Re: How to make a flashing light?
Gregory Weston <uce@[E  2008-04-01 12:49:03 
Re: How to make a flashing light?
Jim <jim@[EMAIL PROTEC  2008-04-01 13:56:14 
Re: How to make a flashing light?
Heath Raftery <hrafter  2008-04-01 23:01:38 
Re: How to make a flashing light?
Jim <jim@[EMAIL PROTEC  2008-04-02 07:22:17 
Re: How to make a flashing light?
Tom Harrington <tph@[E  2008-04-01 09:25:49 
Re: How to make a flashing light?
Jim <jim@[EMAIL PROTEC  2008-04-02 07:20:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 2:31:26 CDT 2008.