El Capitan - NSProgressIndicator doesn't show

I have an OS X Swift app which works correctly in Yosemite, but the progress bar doesn't show in El Capitan. All else works normally in the "real" program.


I created a stub program to try to debug the problem, but I still can't get the progress bar to show. Using XCode 7.0.1 (7A1001) and created this from scratch


The test app takes a counter input (typed in) and should show a progress bar until count is reached. If the progress bar is unhidden it does appear, but doesn't refresh until the end, when it shows blue 100%. I've added progressBar.display() - no effect. same with window.display() no change.

progCount is another field I put on the window to see if I could see the numbers ticking up, but that didn't show until the last number.

I used debug and saw the i value ticking up, and progressBar.doubleValue also incremented. It looks like a window redraw issue but I can't find what to do differently. Remember too, this works on Yosemite.


Any help would be welcome, thanks


--- code fragment ----

@IBOutlet weak var window: NSWindow!

@IBOutlet weak var progressBar: NSProgressIndicator!

@IBOutlet weak var counter: NSTextField!

@IBOutlet weak var progCount: NSTextField!

(a bit of housekeeping not shown)

@IBAction func countUp (sender: NSButton) {

var i=0

if counter.integerValue != 0 {

progressBar.hidden = false

progressBar.minValue = 0.0

progressBar.doubleValue = 0.0

progressBar.maxValue = counter.doubleValue

while i < counter.integerValue {

i=i+1

progressBar.incrementBy(1.0)

progCount.doubleValue = progressBar.doubleValue

}

progressBar.hidden = true

}

}

--- end ---

My app won't show a progress indicator in 10.13, but the same app works fine in previous versions of os x


the way the code is called is:


dispatch_async(dispatch_get_main_queue(), ^{
                [self updateStatus];
            });

- (void)updateStatus
{
    [topTextField setStringValue:topTextFieldString];

    [progressIndicator setDoubleValue:progressIndicatorValue];
}


This is how the code has worked for years. In versions below 10.13, it works fine. In 10.13 High Sierra, the text field updates just fine, but the progress indicator is not visible at all. It's almost like it's hidden (but it's not).


Any ideas?

El Capitan - NSProgressIndicator doesn't show
 
 
Q