put foo && "Reading from disk:" && getAT(PathList, x)
if foo then exit repeat
if gMyPath = "EOL" then CantFindCD
end repeat
else
set gMyPath = "SHOWCASE:FILES:"
set foo = ReadCDTestFile()
put foo
if NOT foo then CantFindCD
end if
end
-- This handler uses the FileIO XObject to determine whether the text file exists on the selected disk.
on ReadCDTestFile
global gFile, gMyPath, gTheProblem
put "READ CD ROUTINE"
if objectP(gFile) then gFile(mDispose)
if the machineType = 256 then
set TestPath = gMyPath & "CDLOCALE.TXT"
else
set TestPath = gMyPath & "CDLOCALE.TXT"
end if
set gFile = fileIO(mNew, "read", TestPath)
if NOT objectp( gFile ) then
put "NOT found"
return FALSE
else
gFile(mDispose)
put "Found!"
setAt the searchpath 1, gMyPath
return TRUE
end if
end
-- If the file can't be found, give up and go home.
on CantFindCD
if the machinetype = 256 then
alert "You don't seem to have the Showcase CD-ROM loaded! Please make sure ¼
the CD is in the drive." & RETURN & RETURN & "Then restart the application."
else
alert "You don't seem to have the Showcase CD-ROM loaded! Please make sure ¼
the CD is in the drive and that the" && QUOTE & "Showcase" & QUOTE && "icon appears on the desktop." & RETURN & RETURN & "Then restart the application."