- (IBAction)ProcessButton:(id)sender
{
// calls the install file according to the correct OS version, hides the overview screen and shows a progress bar to show the progress
[prnOverview orderOut:nil];
[prnProcessing makeKeyAndOrderFront:self];
[prnProgress setIndeterminate:NO];
for(i=0; i<[arrPRNint count]; i++) {
//sets the length of the progress in time according to the count of arrPRNint array and updates the display until finished
[prnProgress setDoubleValue:100*i/(double)[arrPRNint count]];
[prnProgress displayIfNeeded];
stTmp = [arrPRNint objectAtIndex: i];
if([stDvrChk isEqualToString:@"Tiger"]) {
[arrInstalled addObject:objc_msgSend(prninstall104, NSSelectorFromString(stTmp))];
}
else {
[arrInstalled addObject:objc_msgSend(prninstall, NSSelectorFromString(stTmp))];
}
}
//hides the progress bar and brings up the wrapup screen. Will display the printers that were installed correctly and then display a message panel if there was an error in copying a driver.
[prnProcessing orderOut:nil];
[prnWrapup makeKeyAndOrderFront:self];
NSBeep();
for(i=0; i<[arrInstalled count]; i++) {
[endtextView insertText:[((NSString *) [arrInstalled objectAtIndex: i]) stringByAppendingString:@"\n"]];
}
//checks for errors in the installs and will display the error code to contact the help desk
tmp1 = [arrInstalled count];
stTmp = [NSString stringWithFormat:@" \n \n%d out of %d Printers have been Installed correctly\n", tmp, tmp1];
[endtextView insertText:stTmp];
[endtextView setEditable:false];
if (tmp != tmp1) {
NSRunAlertPanel(@"Driver Error", @"There was some error with insatalling the drivers. Please contact the Help Desk for more information", @"Ok", nil, nil);
}
}