11.3 Using a Module | |
Now that we've created a module lookfeel , we can use it in our main application script. Let's go back to our usual file example in the HTML document tree, and edit it like this:
<SCRIPT LANGUAGE=vortex> <USES lookfeel> <A NAME=main PUBLIC> <look title="Introduction"> This is our main application page. </look> </A> </SCRIPT> |
We put the directive <USES> at the top of the script. This tells Vortex that we're going to use the module lookfeel in our script and to include it: we now have access to its functions. The entire example application is still compiled into a single example.vtx file for speed however: the library isn't constantly referred to at run-time.
We save this to example , and run it from our browser. We get the following output: