AxemanMK
03-02-2007, 08:27 AM
Hi.
The very first screen in my setup is a progress bars screen.
Within the "On Start" tab of this screen, I have a for loop that does a CRC
comparison of every file on my CD.
EG : for every item in my table, compare CRC.
This way, I can at least prove that the CD-ROM drive can read every
file on my CD, which contains over 5500 files.
I have got everything working just fine, including incrementing the progress
bars, and plenty of error detection.
As this can take between 1 min to 5 mins depending on CD-ROM drive speed,
I want to give the user the ability to "Skip" this screen.
My Cancel button is labelled "&Skip", and the "On Cancel" tab has the following
code....
-----------------------------------------------------------------------
-- These actions are performed when the Cancel button is clicked.
local nResult = Dialog.Message("Confirm", "Are you sure that you skip the Validation Check ?", MB_YESNO, MB_ICONQUESTION);
if(nResult == IDYES)then
bCancelled = true;
-- Log fact that validation check has been skipped.
SetupData.WriteToLogFile("Notice The Validation Check has been skipped\r\n", true);
Screen.Jump("To my desired screen");
end
-----------------------------------------------------------------------
The problem is, I cannot figure out how to detect if the Cancel button has
been clicked while my for loop is running.
I tried nesting the following as the first set of code in the for loop....
-------------------------------------
if bCancelled == true then
break;
else
-- do the rest of my actions..
end
-------------------------------------
But this does not work !!
When I click the Cancel / Skip button, it appears that the for loop is
running so tight that the button never actually gets depressed and
the for loop will not quit.
Any ideas ?
The very first screen in my setup is a progress bars screen.
Within the "On Start" tab of this screen, I have a for loop that does a CRC
comparison of every file on my CD.
EG : for every item in my table, compare CRC.
This way, I can at least prove that the CD-ROM drive can read every
file on my CD, which contains over 5500 files.
I have got everything working just fine, including incrementing the progress
bars, and plenty of error detection.
As this can take between 1 min to 5 mins depending on CD-ROM drive speed,
I want to give the user the ability to "Skip" this screen.
My Cancel button is labelled "&Skip", and the "On Cancel" tab has the following
code....
-----------------------------------------------------------------------
-- These actions are performed when the Cancel button is clicked.
local nResult = Dialog.Message("Confirm", "Are you sure that you skip the Validation Check ?", MB_YESNO, MB_ICONQUESTION);
if(nResult == IDYES)then
bCancelled = true;
-- Log fact that validation check has been skipped.
SetupData.WriteToLogFile("Notice The Validation Check has been skipped\r\n", true);
Screen.Jump("To my desired screen");
end
-----------------------------------------------------------------------
The problem is, I cannot figure out how to detect if the Cancel button has
been clicked while my for loop is running.
I tried nesting the following as the first set of code in the for loop....
-------------------------------------
if bCancelled == true then
break;
else
-- do the rest of my actions..
end
-------------------------------------
But this does not work !!
When I click the Cancel / Skip button, it appears that the for loop is
running so tight that the button never actually gets depressed and
the for loop will not quit.
Any ideas ?