Hi again.
I've got it working, kinda...
I added an if statement, that goes
if file.exists= false then
MsgBox ("No Master Access File")
end if
This works... but is it graceful <smile>
Michael
>
> From: Jonathan Johnson <[EMAIL PROTECTED]>
> Date: 2006/06/25 Sun AM 08:23:27 EST
> To: REALbasic NUG <[email protected]>
> Subject: Re: exception error
>
>
> On Jun 25, 2006, at 7:18 AM, <[EMAIL PROTECTED]> wrote:
>
> > As per your request, here is the copy of my code where the program
> > err's out. I'm working with Mac
> > OSX. If I step through, it does, indeed, get to the exception
> > handling. However, as I stated earlier, it
> > comes to a screeching halt at the indicated line, like it is trying to
> > actually read from the file.
> >
> > ===========================================
> > if file <>nil then 'is the file empty?
> > filereadfrom=file.OpenAsTextFile 'open as a text file
> > do
> > nameholding = filereadfrom.readline <------err's at this point
>
> There are many situations that OpenAsTextFile will fail: 1) The file
> does not exist (check for File.Exists), 2) You don't have permissions
> to read the file, 3) The file is open for writing by either you or
> another process. You should add a check for "filereadfrom" being nil.
>
> HTH,
> Jon
>
>
> --
> Jonathan Johnson
> REAL Software, Inc.
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>
>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>