PDA

View Full Version : Critical BUG introduced in version 7.5.1006!


Tomasin
07-07-2009, 01:02 PM
I found a critical bug.

I have tested with version 7.5.1004 and it works perfectly, but in version 7.5.1006 does not work.

It has to do with StatusDLG, pressing the button "cancel" the statusdlg.

In a search of files in callbackfunctions of it, if we add this code:

function cancel ()

StatusDlg.IsCancelled x = ();
if x == true then

StatusDlg.SetMessage ( "");
StatusDlg.SetStatusText ( "");
StatusDlg.SetAutoSize (false);
StatusDlg.Hide ();
Application.ExitScript ();

end

end

The statusdlg disappears, but the script continues (still scanning).

In version 7.5.1004 if that works correctly

Tomasin
07-07-2009, 01:22 PM
More details:

the code use one function for enumerate drives, and scan all drives (with "for"). this repeat the funcion of search for any drive. (if not use this, work correctly)

Tomasin
07-07-2009, 03:05 PM
ok, I made more tests and finally I found the solution (in version 7.5.1004 but worked correctly ...)

We should add this code:

On page preload:

esit = "";

on code for stop of search

function cancel ()

StatusDlg.IsCancelled x = ();
if x == true then

StatusDlg.SetMessage ( "");
StatusDlg.SetStatusText ( "");
StatusDlg.SetAutoSize (false);
esit = Yes;
StatusDlg.Hide ();
Application.ExitScript ();

end

if exit == Yes then
Application.ExitScript ();
end

end

so it works correctly

MicroByte
07-13-2009, 05:27 AM
you should be checking the "StatusDlg.IsCancelled" from inside your callback and set the correct return value to stop the progress, the code continues because you have not told the function to exit its self, clicking the cancel button on the status dialog will not stop your code, you need to do that

remember, the status dialog is a information window only, it only does what you tell it to do

function MyCallBack(SomeVar)

-- your callback code



if StatusDlg.IsCancelled() then
return false
else
return true
end
end