Re: memory error
Re: memory error
- Subject: Re: memory error
- From: Emmanuel <email@hidden>
- Date: Sat, 24 Feb 2001 16:05:31 -0500
At 14:46 -0500 24/02/01, Brad Giesbrecht wrote:
>
I would like to be able to save my "position" in
>
the repeat loop and return to the repeat when
>
the user has closed some windows.
This is possible, but it is complicated, and will bring much problems. You
would have to pass control to an idle loop.
If, instead of asking the user to close windows, you could have your script
do it, the problem would be made much easier.
Here is how I would code it (well, how I would first try to):
-------------------------------------------- pseudo-code
repeat -- loop on the files to open
repeat
try
Open_The_File()
exit repeat
on error
Do_Some_Cleaning()
end
end
end
--------------------------------------------
Open_The_File() being the routine which opens the file.
Do_Some_Cleaning() could consist, for instance, in closing one window.
You may know or want to know that a memory error comes as number -108. The
"on error" handler should test for this (it would not be a good thing to
close all windows if the error is not a memory error !)
HTH
Emmanuel
References: | |
| >memory error (From: Brad Giesbrecht <email@hidden>) |