课件编号425148

大气压力

日期:2024-04-30 科目:科学 类型:小学课件 查看:79次 大小:7460423Byte 来源:二一课件通
预览图 0
大气,压力
    FileIO Xtra Version 1.0.2 - 18apr97 CH FileIO Xtra for Macromedia Director 6.0 ======================================= FileIO provides a set of methods allowing users of Macromedia Director 6.0 to programmatically access files using the Lingo scripting language. Using FileIO ============ If automatic opening is desired, place a copy of the FileIO Xtra for your platform into Application Xtra's folder. If automatic opening is not desired, the Xtra can be placed anywhere and opened using Lingo's 'openXLib' command. This applies to projector's as well, the Xtra must be placed in an Xtra's folder in the same folder as the projector. Each instance of FileIO can reference a single open file. If multiple files are to be opened simultaneously, a new instance of FileIO is required for each opened file. A single instance can be used to open multiple files, as long as the file is closed before a new file is opened. To create a new instance, use the new() method, defined below. To dispose of an instance, set the instance variable to 0. All methods that read from or write to the file must be called after the file has been opened using the openFile() method. If a new file is to be opened using the same instance, the file must be closed using closeFile(). Files can be opened in three different modes: Read, Write and Read/Write. When writing to a file, the contents of the file after the current position are overwritten. Example Lingo set myFile = new(xtra "fileio") -- Create an instance of FileIO set fileName = displayOpen(myFile) -- Display Open Dialog and return the fileName openFile(myFile, fileName, 1) -- Open the file set theFile = readFile(myFile) -- Read the file and return a string to Lingo closeFile(myFile) -- Close the file set myFile = 0 -- Dispose of the instance In this example, we created a new instance and stored it in the variable myFile. Next, the displayOpen() method is used to display an open dialog to allow a file to be chosen. The file is returned as a fully-qualified path string to Lingo. The file is then opened in read only mode, the contents of the file are read, and the file is closed. Lastly, the instance is disposed of. Known Problems ============== The createFile() method does not support relative filenames, or the Lingo '@' operator in pathnames. This will be fixed in a later version. The displaySave() method does not directly inform Lingo whether a user is replacing an existing file. The workaround is to attempt to create the file using createFile() and check the error code for a "File Already Exists" error. History ======= 18apr97 (v1.0.2) Fixed parenting problem with displaySave() and displayOpen() methods. Added support for Authorware. 27may96 (v1.0.1) Added support for double-byte character sets. Added version() method to report FileIO Xtra version information. Added getOSDir() to return a full path to the Windows Directory/System Folder. 15mar96 (v1.0.0 Beta) First public release. Method Reference ================ The first line ... ...

    ~~ 您好,已阅读到文档的结尾了 ~~