• 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: efficient iTune-style filter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: efficient iTune-style filter


  • Subject: Re: efficient iTune-style filter
  • From: Ondra Cada <email@hidden>
  • Date: Sun, 28 Oct 2001 10:37:56 +0100

Jake,

>>>>>> Jake (J) wrote at Sun, 28 Oct 2001 02:04:31 -0500 (EST):
J> I can try to use a data variable to track
J> the time elapsed, and compare with the last key to see if sufficient time
J> has expired. However, I was wondering if there is a more elegant
J> solution to this

Might be questionable what's clean and what's cleaner ;)

I'm used to use for such situations the following pattern:

-(void)toBePerformedOnlyIfXxxDidNotHappenForAwhile:data {
...
}
-...theActionXxx... {
[NSObject cancelPreviousPerformRequestsWithTarget:self
selector:@selector(toBePerformedOnlyIfXxxDidNotHappenForAwhile)
object:something];
...
[self
performSelector:@selector(toBePerformedOnlyIfXxxDidNotHappenForAwhile)
withObject:something afterDelay:theDesiredDelay];
}
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc


References: 
 >efficient iTune-style filter (From: Jake <email@hidden>)

  • Prev by Date: Re: Menu Extras, Preference Panes, and HIServices.framework
  • Next by Date: Re: extending tutorial for timer
  • Previous by thread: efficient iTune-style filter
  • Next by thread: Re: "Required AppleEvents"
  • Index(es):
    • Date
    • Thread