• 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: Live previewing of a loop's progress
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Live previewing of a loop's progress


  • Subject: Re: Live previewing of a loop's progress
  • From: publiclook <email@hidden>
  • Date: Mon, 17 Feb 2003 09:38:59 -0500

If you use a tight loop you need to call -display and possibly -flushWindow.

A better approach is to modify your loop so that events can still be processed. That way you can have a cancel button that works and the applications menus will work etc. programmed in mail:

- (void)renderStep:(id)dummy
{
// do some rendering
[someImageView setImage:imageComposited];

// if finished rendering set done = YES

if(!done) {
[self preformSelector:@selector(renderStep:) withObject:nil afterDelay:0];
}
}


- (void)start:(id)sender
{
done = NO;
[self preformSelector:@selector(renderStep:) withObject:nil afterDelay:0];
}

- (void)stop:(id)sender
{
done = YES;
}


On Monday, February 17, 2003, at 03:11 AM, Brian Ganninger wrote:

Part of my app's interface is an NSImageView that I use as a preview of
what's going on while the program works. What happens is that a progress
indicator starts before the beginning of the loop, then the loop executes
and during the loop a method is called that composites an NSImage, which is
then passed over to the NSImageView via [NSImageView
setImage:imageComposited]; so the user can see the compositing results. The
loop then continues on.

What actually happens though is that the loop executes entirely without the
ImageView updating until the loop has finished. I know the image is
compositing correctly because during the loop the image is written out as a
.icns file, which I've opened and checked, and they are correct. The problem
lies in how can I force this to update or introduce a stutter of some sort
to make the ImageView update?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Live previewing of a loop's progress
      • From: Max Seelemann <email@hidden>
References: 
 >Live previewing of a loop's progress (From: Brian Ganninger <email@hidden>)

  • Prev by Date: Re: Displaying file contents in NSTextView
  • Next by Date: Second .nib window - Copy key equivalent not working
  • Previous by thread: Live previewing of a loop's progress
  • Next by thread: Re: Live previewing of a loop's progress
  • Index(es):
    • Date
    • Thread