• 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: Progress Indicator problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progress Indicator problem


  • Subject: Re: Progress Indicator problem
  • From: Brock Brandenberg <email@hidden>
  • Date: Sat, 26 Oct 2002 10:53:59 -0500

Keith,

> That doesn't work either. According to the docs, startAnimation: is
> only for an indeterminate progress indicator. (But maybe yours is first
> indeterminate and then determinate, i.e. barber pole and then progress
> bar.) Anyway, I think I'm doing it all right. Two strange things,
> though, (1) other items, several text fields, are being updated (and
> working) in the same loop using the display: method, and (2) when the
> loop finishes, the progress indicator advances to max. This leads me to
> believe I have some other problem in my code. What could be blocking a
> progress indicator from advancing when the values are being set
> correctly and display: is being called?

Switch to displayIfNeeded: and see if it makes a difference. I recall seeing
some odd behavior when I first used a progress indicator, and I (like Scott)
now have working code with a progress indicator successfully incrementing in
a loop in a modal sheet.

I use the following methods with an enumerator in the sheet:

[progressSheet orderFront:self];

myModalSession = [NSApp beginModalSessionForWindow:progressSheet];

...

[progressBar setIndeterminate:NO];
[progressBar setMinValue:0];
[progressBar setDoubleValue:0];
[progressBar setMaxValue:[selectedRows count]];

while( selRow = [sr_enumerator nextObject] )
{
[progressBar incrementBy:1];
[progressBar displayIfNeeded];
}

[progressBar setIndeterminate:YES];
[progressBar stopAnimation:self];

...

[NSApp endModalSession:myModalSession];
myModalSession = nil;
[progressSheet orderOut:nil];


Maybe this will help point out some difference in your code.

Brock Brandenberg

----- industrial design @ www.bergdesign.com ------
_______________________________________________
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.

  • Prev by Date: drawers closes, but is visible
  • Next by Date: Re: Follow-up: Cocoa thread-safety
  • Previous by thread: Re: Progress Indicator problem
  • Next by thread: iTunes/iCal-style buttons
  • Index(es):
    • Date
    • Thread