wlh99
Apr 26, 08:59 PM
After that I implement a Cancel method pointing to sender (button)
So, my goal is to use 1 start button and 1 cancel button.. and just do their actions. I have set up a the start button to start both timers, obviously both start their countdown at the same time which is not good.
I want to tell one timer to start and if I press cancel, invalidate it. Then If I press start again, call the second timer. (I do this because I read that you can't reuse a timer after you invalidate it).
Some people have suggested to use Booleans like true or false, or conditions. What do you think?
What if after pressing the start button, you create a timer and start it. Then pressing the cancel button invalidates and releases it. Then pressing the start button would create another timer, using the same pointer.
Totally untested and probably broken code below, but should demonstrate the idea:
-(IBAction)startButton:(id) sender {
// myTimer is declared in header file ...
if (myTimer!=nil) { // if the pointer already points to a timer, you don't want to create a second one without stoping and destroying the first
[myTimer invalidate];
[myTimer release];
}
// Now that we know myTimer doesn't point to a timer already..
myTimer = [NSTimer scheduledTimerWithTimeInterval:aTimeInterval target:self selector:@selector(echoIt:) userInfo:myDict repeats:YES];
[myTimer retain];
}
-(IBAction)cancelIt:(id) sender {
[myTimer invalidate];
[myTimer release]; // This timer is now gone, and you won't reuse it.
}
So, my goal is to use 1 start button and 1 cancel button.. and just do their actions. I have set up a the start button to start both timers, obviously both start their countdown at the same time which is not good.
I want to tell one timer to start and if I press cancel, invalidate it. Then If I press start again, call the second timer. (I do this because I read that you can't reuse a timer after you invalidate it).
Some people have suggested to use Booleans like true or false, or conditions. What do you think?
What if after pressing the start button, you create a timer and start it. Then pressing the cancel button invalidates and releases it. Then pressing the start button would create another timer, using the same pointer.
Totally untested and probably broken code below, but should demonstrate the idea:
-(IBAction)startButton:(id) sender {
// myTimer is declared in header file ...
if (myTimer!=nil) { // if the pointer already points to a timer, you don't want to create a second one without stoping and destroying the first
[myTimer invalidate];
[myTimer release];
}
// Now that we know myTimer doesn't point to a timer already..
myTimer = [NSTimer scheduledTimerWithTimeInterval:aTimeInterval target:self selector:@selector(echoIt:) userInfo:myDict repeats:YES];
[myTimer retain];
}
-(IBAction)cancelIt:(id) sender {
[myTimer invalidate];
[myTimer release]; // This timer is now gone, and you won't reuse it.
}
BlindMellon
Apr 25, 08:34 PM
I don't get the fascination with a marginal bigger screen, if I need a bigger screen I get my iPad.
They had the perfect opportunity to change the screen size last year. They introducing a higher resolution screen and a new design. They could have designed the phone for a larger screen and talked about how the screen was both larger and sharper. Instead, they kept the same screen size and talked about the 326 PPI retina resolution.
So now you think that they are adding a larger screen with fewer PPI to last years' form-factor which was designed for a 3.5" screen? C'mon... get real.
Why would Apple create a new design with the same screen size if they were planning on using that same design a year later with a larger screen? It doesn't make any sense. If they had plans to use a larger screen, they would have done it with the iPhone 4. If they do it in the future, it will have a different design.
this is true and one of my main gripes: they had the opportunity to enlarge the screen back when they redesigned the whole damn phone. they drew a line in the sand with the 3.5" screen and i doubt they'll change it any time soon. plus, the longer they wait, the more foolish they'll look when they finally do get around to it.
They had the perfect opportunity to change the screen size last year. They introducing a higher resolution screen and a new design. They could have designed the phone for a larger screen and talked about how the screen was both larger and sharper. Instead, they kept the same screen size and talked about the 326 PPI retina resolution.
So now you think that they are adding a larger screen with fewer PPI to last years' form-factor which was designed for a 3.5" screen? C'mon... get real.
Why would Apple create a new design with the same screen size if they were planning on using that same design a year later with a larger screen? It doesn't make any sense. If they had plans to use a larger screen, they would have done it with the iPhone 4. If they do it in the future, it will have a different design.
this is true and one of my main gripes: they had the opportunity to enlarge the screen back when they redesigned the whole damn phone. they drew a line in the sand with the 3.5" screen and i doubt they'll change it any time soon. plus, the longer they wait, the more foolish they'll look when they finally do get around to it.
Chimera
Sep 12, 07:32 AM
You'd have thought Apple could upload the new stuff to different servers then just switch them at the right time, are they trying to hype this up further!:p
bob67
Sep 12, 07:28 AM
can we confim the what countrys itunes stores are down ?
usa/uk ...
german store is down too
usa/uk ...
german store is down too
Macky-Mac
May 4, 03:46 PM
No, we've had similar discussions before regarding a physician's willingness to treat someone due to their own personal religious beliefs, etc. and their response was quite different... the vast majority in that case believed that the FEDERAL GOVERNMENT should not allow doctors to ask such questions or refuse to perform procedures they found philosophically reprehensible such as abortions... as if each physician in the country is some sort of robot working at the service of the government no longer allowed to think or reason on their own. But, now that it's about guns, they take a different approach. It's a very distinct hypocrisy.
nope; you've simply mixed up the issues and the responses
nope; you've simply mixed up the issues and the responses
jcb10
Apr 14, 03:41 PM
My son, then two, was pulled aside by "random" secondary screening in 2005 at Ontario airport in SoCal. I wasn't too upset, because nothing inappropriate (other than the absurdity of checking a two-year-old) was done, but was struck by the waste of time. And lest anyone think we were profiled, we are both obviously white, with English-sounding names, traveling on round-trip tickets.
toromac
Apr 9, 03:56 PM
um just walked into my local Best buy and bought a 16gb ipad 2 Wifi in black. they had like 7 or 8 of each model. interesting... maybe they�re not participating in this so called promotion.
*LTD*
Mar 15, 10:46 PM
You really need to step out of your fanboi bubble, it seems a little silly to be honest.
The entire industry is one big Apple "fanboi", bud. What Apple does, everyone else moves to copy or get it on. My "bubble" is the entire tech industry where it concerns the average user.
What's "silly" is the Apple fansite bubble. Apple fansites on the ass-end of the net with their loveable little geek contingent perpetually out of touch with the actual market.
Step into 2011. It's all about Apple and where they're taking the industry.
The entire industry is one big Apple "fanboi", bud. What Apple does, everyone else moves to copy or get it on. My "bubble" is the entire tech industry where it concerns the average user.
What's "silly" is the Apple fansite bubble. Apple fansites on the ass-end of the net with their loveable little geek contingent perpetually out of touch with the actual market.
Step into 2011. It's all about Apple and where they're taking the industry.
thegman1234
Jan 2, 11:48 PM
I actually think the numbers will be smaller because even if people say they will leave now, when it comes time to actually do it....only a portion will actually follow through.
That's a good point. Leave it to people to actually do the things they say they're going to do... but that's a different topic for a whole different forum.
That's a good point. Leave it to people to actually do the things they say they're going to do... but that's a different topic for a whole different forum.
OdduWon
Oct 11, 05:07 AM
a nice iPod Video with NEF/RAW reading capability for us photographers, I'm a waiting customer. And yes, a smaller MacBook with 10 hour battery life, non-reflective screen and a graphics card to use it with Aperture/RAW would be sooo nice... :)
the macpod pro could be a notepad device that has the ability to interface with ext hard drives adn icoul be like a wireless ouch screen 3/4 in thin
the macpod pro could be a notepad device that has the ability to interface with ext hard drives adn icoul be like a wireless ouch screen 3/4 in thin
carlgo
Dec 14, 01:31 PM
Yay, satellites. Or drones. There you go, so much cooler. Space age instead of silly towers.
How a little iPhone could transmit to hundreds of miles into space is problematical, but there is all of this alien technology...
Maybe the data centers are sat communications facilities.
Ahhh, not likely but it is fun to think about.
How a little iPhone could transmit to hundreds of miles into space is problematical, but there is all of this alien technology...
Maybe the data centers are sat communications facilities.
Ahhh, not likely but it is fun to think about.
wingnut8
Apr 25, 02:35 PM
Wirelessly posted (iPhone 3GS: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8G4 Safari/6533.18.5)
4S would be dumb. Every phone from here on out is going to be faster. No need for the "speed" added on the the end.
4S would be dumb. Every phone from here on out is going to be faster. No need for the "speed" added on the the end.
Jay42
Oct 14, 09:36 AM
Just noticed something at work (large retailer). The iPod case is unusually empty of iPod videos. We may have 15 total when the case usual has 50-100. The iPod Nanos on the other hand are completely stocked full. Usually this only happens when Apple is going to release a new version and stops sending the store product. I know it sounds weird because they just upgraded the 5G but it was a very insignificant update. Just thought I'd add that to the rumor mill.
Mmmm, they're not replacing the current iPod-With-Video models. If anything, they will add another model "on top" of the ipod family. Not sure if your shortage of iPods really means anything.
If Apple really is going to release something, it is already in full production as we speak. They will need to announce it and get it into stores by November to make the holiday season and that would still be last minute. After October, I'm not holding my breath.
Mmmm, they're not replacing the current iPod-With-Video models. If anything, they will add another model "on top" of the ipod family. Not sure if your shortage of iPods really means anything.
If Apple really is going to release something, it is already in full production as we speak. They will need to announce it and get it into stores by November to make the holiday season and that would still be last minute. After October, I'm not holding my breath.
rovex
Mar 19, 05:30 PM
http://gifjes.web-log.nl/photos/uncategorized/hahaha.gif
and the way you express yourself practically shows me why people 'diss' all your gadgets.
you Americans have some ridiculous proverbs/figure of speeches that no other Anglophones around the world can even attempt to understand.
And the English language's inception was here in England so why do Americans spell rumours 'rumors'? And there are an abundance of similar examples.
and the way you express yourself practically shows me why people 'diss' all your gadgets.
you Americans have some ridiculous proverbs/figure of speeches that no other Anglophones around the world can even attempt to understand.
And the English language's inception was here in England so why do Americans spell rumours 'rumors'? And there are an abundance of similar examples.
Amazing Iceman
May 4, 08:39 AM
I'll buy one when it gets a capacitive pressure based screen/stylus (Like the HTC Flyer)
Never heard of the HTC Flyer, I'll look into it. The problem with most pressure sensitive devices is that the pressure sensors start failing after a while.
Never heard of the HTC Flyer, I'll look into it. The problem with most pressure sensitive devices is that the pressure sensors start failing after a while.
-SD-
Apr 6, 01:08 PM
Just got it!
I'd be very interested to hear your thoughts on it once you've had a chance to get comfortable with it.
:apple:
I'd be very interested to hear your thoughts on it once you've had a chance to get comfortable with it.
:apple:
notjustjay
Apr 21, 12:02 PM
I think I'd prefer a system where only upvotes ("likes") are allowed (e.g. Engadget). That way you can still see who's got the most positive/popular posts while not opening it up quite so much to abuse or the negative connotations associated with a negative score.
Another forum I visit (RedFlagDeals) has a similar system where people can be "thanked" for particular posts, and then their user profile shows how many times in total people have thanked them. It helps show who is the most helpful or who has a good reputation for providing useful advice.
Another forum I visit (RedFlagDeals) has a similar system where people can be "thanked" for particular posts, and then their user profile shows how many times in total people have thanked them. It helps show who is the most helpful or who has a good reputation for providing useful advice.
John Purple
Jan 9, 04:20 AM
New user interface:
WYThIWYG (What you think is what you get) :D:D:D:D
WYThIWYG (What you think is what you get) :D:D:D:D
roadbloc
Mar 13, 04:34 AM
Transition.
The industry is undergoing a massive paradigm-shift, thanks to Apple
No. A new market has been opened by Apple. That is as far as it goes. An iPad is not for everyone. Tablets will never kill off Laptops or Desktops or Servers.
The industry is undergoing a massive paradigm-shift, thanks to Apple
No. A new market has been opened by Apple. That is as far as it goes. An iPad is not for everyone. Tablets will never kill off Laptops or Desktops or Servers.
-aggie-
Jul 21, 01:55 PM
Maybe Apple could make that an Easter Egg. Those were the days, when Easter Eggs were common. Fun times.
Rocketman
And bunnies. Easter eggs and bunnies...sigh.
It's funny how people give Apple a hard time for spinning this information, when we all know the media was doing their own spin. If the media truly wanted the truth, they'd have conducted some research and have been able to really give us a good percent on how many people experience problems when using the iPhone 4 (I know, every phone has the "defect"...blah, blah, blah, blah). However, the real percent wouldn't make a good story. So, how can you blame Apple for at least trying to defend itself?
Rocketman
And bunnies. Easter eggs and bunnies...sigh.
It's funny how people give Apple a hard time for spinning this information, when we all know the media was doing their own spin. If the media truly wanted the truth, they'd have conducted some research and have been able to really give us a good percent on how many people experience problems when using the iPhone 4 (I know, every phone has the "defect"...blah, blah, blah, blah). However, the real percent wouldn't make a good story. So, how can you blame Apple for at least trying to defend itself?
flottenheimer
Apr 16, 02:43 PM
Wishing for a matte black plastic finish on the next iPhone.
Philberttheduck
Sep 12, 12:14 AM
Here's to a CRAZY Tuesday morning. :D
Hovey
Jul 21, 12:04 PM
But Apple admitted that it DOES drop more calls than 3GS.
They spun it as "less than 1 per 100", but assuming all 3,000,000 iPhone 4 users make about 5 calls per day, that's over ONE MILLION dropped calls per week MORE than iPhone 3GS.
It's a problem.
It's been reproduced by CNET, Consumer Reports, NYT, and many others.
The debate here is not whether there's a problem, but why Apple is obfuscating, rather than fixing it, pretending that bridging the gap of their electrically exposed antenna is equivalent to attenuating an antenna by completely covering it with one's meaty hand.
(seems like moving this gap to the bottom edge of the phone where it's far less likely to be touched, would be an easy fix).
Umm, that's still less than 1%. That's pretty good. That would be out of 100 million calls. 99 million calls were fine.
They spun it as "less than 1 per 100", but assuming all 3,000,000 iPhone 4 users make about 5 calls per day, that's over ONE MILLION dropped calls per week MORE than iPhone 3GS.
It's a problem.
It's been reproduced by CNET, Consumer Reports, NYT, and many others.
The debate here is not whether there's a problem, but why Apple is obfuscating, rather than fixing it, pretending that bridging the gap of their electrically exposed antenna is equivalent to attenuating an antenna by completely covering it with one's meaty hand.
(seems like moving this gap to the bottom edge of the phone where it's far less likely to be touched, would be an easy fix).
Umm, that's still less than 1%. That's pretty good. That would be out of 100 million calls. 99 million calls were fine.
Some_Big_Spoon
Apr 15, 01:30 PM
Looks uncomfortable to hold for long periods of time. iPhones have rounded edges as they're meant to be held in your hand for hours, if need be. Sharp edges would make that a less than ideal situation, I'd think?
No comments:
Post a Comment