I have a modal window with code to update both a progress bar and corresponding 
text...the progress bar gets updated just fine but the textfield never does 
(except if I re-run the method the last string I pushed to the textfield from 
the previous run does appear).My understanding was that if you ran a modal 
session you could still interact with the UI to display changes...let me know 
what I'm missing here. I created a simple run loop to detail my issue.

[NSApp  beginSheet: progressWindow
           modalForWindow: mainWindow
                modalDelegate: self
           didEndSelector: nil
                  contextInfo: nil];
        NSModalSession session = [NSApp 
beginModalSessionForWindow:progressWindow];
        [progressIndicator displayIfNeeded];
        [progressIndicator setDoubleValue:0.0];
        [NSApp runModalSession:session];
        int mmm;
        for (mmm=0;mmm<150;mmm++)
        {
                [progressIndicator displayIfNeeded];
                [progressIndicator setDoubleValue:mmm];
                NSString *temp222 = [NSString stringWithFormat:@"%d",mmm];
                NSLog(@"string value is %d",mmm);
                [statusText setStringValue:temp222];
        }
        NSDate *future2 = [NSDate dateWithTimeIntervalSinceNow:2];
        [NSThread sleepUntilDate:future2];
        [NSApp endModalSession:session];
        [progressWindow orderOut:self];
        [NSApp endSheet:progressWindow];


Thanks,
jeremy
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to