• 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: Preventing beach balls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preventing beach balls


  • Subject: Re: Preventing beach balls
  • From: Paul Borokhov <email@hidden>
  • Date: Mon, 19 Feb 2007 10:43:39 -0800

Hmm...how exactly would I go about doing this? Currently I have
...
	timer = [[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:delay] interval:[[NSUserDefaults standardUserDefaults] integerForKey:@"updateTime"] target:self selector:@selector(foo:) userInfo:nil repeats:YES];
	[[NSRunLoop currentRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode];
...
and then
- (void) foo:(NSTimer *)aTimer {
...
	[self bar];
... }
If "bar" takes too long, the interface freezes. What am I missing?
Paul

----------Original Message----------
  On 2/19/07 17:50 , Martin Wennerberg (email@hidden) wrote:
> It might be easier for you to split the work into smaller chunks and
> use an NSTimer to do it asynchronously on the main thread.
>
> Cheers,
> 	Martin
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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)

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

  • Follow-Ups:
    • Re: Preventing beach balls
      • From: Sherm Pendley <email@hidden>
    • Re: Preventing beach balls
      • From: Shawn Erickson <email@hidden>
References: 
 >Preventing beach balls (From: Paul Borokhov <email@hidden>)
 >Re: Preventing beach balls (From: Martin Wennerberg <email@hidden>)

  • Prev by Date: Detecting printer changes in NSPageLayout question.
  • Next by Date: Re: Custom PDF annotation widgets
  • Previous by thread: Re: Preventing beach balls
  • Next by thread: Re: Preventing beach balls
  • Index(es):
    • Date
    • Thread