FROM : John Stiles
DATE : Wed Nov 03 20:33:10 2004
My installer app has a sheet that shows progress. It drops down, my app
does its work while the progress bar fills up, and then when my app is
done it rolls up the sheet.
I've had some end users report that they'll start an installation, hide
my application (via cmd+H), come back to it later and the install has
completed 100%, but the sheet is still there. I know that my app has
asked to hide the sheet because the parent window behind the sheet has
been updated :) It works fine if you don't hide the app.
Here's the code in question. Why is this happening? It's occurring in
10.3.5.
PS yes, the variable naming conventions suck a bit; if I redid it today
they'd be named differently. Whatever. :)
void InstallerShowProgress()
{
[s_installer performSelectorOnMainThread:@selector(progressSheetShow:)
withObject:NULL waitUntilDone:YES];
}
void InstallerHideProgress()
{
[s_installer performSelectorOnMainThread:@selector(progressSheetHide:)
withObject:NULL waitUntilDone:YES];
}
- (void) progressSheetShow:(id)object
{
[_window makeKeyAndOrderFront:self]; // sheets act
goofy if the parent is minimized
[_progressSheetBar setDoubleValue:0.0];
[_progressSheetStopButton setEnabled:YES];
[NSApp beginSheet:_progressSheet
modalForWindow:_window
modalDelegate:self
didEndSelector:NULL
contextInfo:NULL];
}
- (void) progressSheetHide:(id)object
{
[NSApp endSheet:_progressSheet returnCode:0];
[_progressSheet orderOut:self];
}
DATE : Wed Nov 03 20:33:10 2004
My installer app has a sheet that shows progress. It drops down, my app
does its work while the progress bar fills up, and then when my app is
done it rolls up the sheet.
I've had some end users report that they'll start an installation, hide
my application (via cmd+H), come back to it later and the install has
completed 100%, but the sheet is still there. I know that my app has
asked to hide the sheet because the parent window behind the sheet has
been updated :) It works fine if you don't hide the app.
Here's the code in question. Why is this happening? It's occurring in
10.3.5.
PS yes, the variable naming conventions suck a bit; if I redid it today
they'd be named differently. Whatever. :)
void InstallerShowProgress()
{
[s_installer performSelectorOnMainThread:@selector(progressSheetShow:)
withObject:NULL waitUntilDone:YES];
}
void InstallerHideProgress()
{
[s_installer performSelectorOnMainThread:@selector(progressSheetHide:)
withObject:NULL waitUntilDone:YES];
}
- (void) progressSheetShow:(id)object
{
[_window makeKeyAndOrderFront:self]; // sheets act
goofy if the parent is minimized
[_progressSheetBar setDoubleValue:0.0];
[_progressSheetStopButton setEnabled:YES];
[NSApp beginSheet:_progressSheet
modalForWindow:_window
modalDelegate:self
didEndSelector:NULL
contextInfo:NULL];
}
- (void) progressSheetHide:(id)object
{
[NSApp endSheet:_progressSheet returnCode:0];
[_progressSheet orderOut:self];
}
| Related mails | Author | Date |
|---|---|---|
| John Stiles | Nov 3, 20:33 | |
| John Stiles | Nov 3, 23:50 | |
| Daniel Todd Currie | Nov 4, 00:37 | |
| John Stiles | Nov 4, 00:39 | |
| Daniel Todd Currie | Nov 4, 01:26 | |
| John Stiles | Nov 4, 01:26 | |
| Jonathon Mah | Nov 4, 13:28 | |
| John Stiles | Nov 4, 19:14 |






Cocoa mail archive

