Re: Progress Indicator problem
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.