home *** CD-ROM | disk | FTP | other *** search
- on Test
- if ReadFileIntoCastMember(2, "test.txt") = 1 then
- PrintCastMember(2)
- else
- alert("Datei nicht gefunden!")
- end if
- PrintCastMember(3)
- end
-
- on ReadFileIntoCastMember theCastNum, theFileName
- set myFile to new(xtra("fileio"))
- openFile(myFile, theFileName, 1)
- if status(myFile) = 0 then
- set theFile to readFile(myFile)
- put theFile into field theCastNum
- set theReturn to 1
- else
- set theReturn to 0
- end if
- closeFile(myFile)
- set myFile to 0
- return theReturn
- end
-
- on PrintCastMember theCastNum
- print(cast theCastNum)
- end
-