Tutorial Bonus Lesson
English spoken here!
OpenXION is the English-like programming language based on Apple's HyperTalk.
No Installation!
Just download, unzip, & run!
Congratulations on completing the tutorial. I sincerely hope you found it useful and welcome any comments:
As promised, below you will find a script file to download, along with some comments about the script.
Click to download the Bonus File
The above file contains a single script in a zip archive. When unzipped, the script is named "openxion.org.xn". It is fully commented. You can open it in any text editor to see the code.
The openxion.org.xn script requires two additional library scripts, but if they are not available, which will be
the case the first time you run it, the script will create those required files for you and then load and execute the
functions contained therein.
The command for running the script depends on whether you use xion or OpenXION.jar. Choose
the one appropriate to your installation:
xion -s allow openxion.org.xn
or
java -jar OpenXION.jar -s allow openxion.org.xn
Be sure to run the script as shown or you will get a bunch of security warnings.
The -s allow option tells the interpreter to ignore
security warnings when opening, reading, and writing local files.
* Run the script twice and notice the difference in output before and after the library files are created.
This script includes:
— the use of handlers.
— the use of functions.
— the use of try...catch blocks for error detection.
— opening, creating, and writing files.
— including external script files.
— the use of put and get.
— the use of quote when writing strings.
Homework Assignment
Can you improve the openxion.org.xn script by including version checking for the external library files?
Here is some of the program logic we might want:
— if the library files are loaded, check that they are the current version.
— if not, write the current version to the existing file and update the version number
Adding this new feature would allow us to send the user a single program and insure they have the current libraries.
One way you could do this is to put a version function in each lib file that would compare itself to the version passed from openxion.org.xn script, and then return the difference.
OK, enough tips for now. GET CODING!
OXRMW
Joe
on OXRMW
put "OpenXION Rocks My World!"
end OXRMW