[:: AlMuist's API Documentation ::]

Using The AlMuist's API

Introduction

I wrote this page for anybody who would like to play with the AlMuist's API in its current state.

Assuming you already have installed the Amool compiler, that you are already familiar with the Amool language and the AlMuist's API, this document just explains how to get the thing working

I have not yet tested it on Windows so I won't explain how to compile it there. But I guess the commands should be more or less the same (please tell me if you managed to get the demos work on Windows!)

Compiling the base classes

Before being able to run applications with external guis you need to compile SwingGui and GuiSystemList:

> cd <the directory containing the amool code>
> acompile @guiSystemList almuists/GuiSystemList.java
Reading config file /usr/local/amool/conf/amool.conf
Amool 1.3.8 compiler/parser v1.4.2 - by Maxime Gamboni
> acompile @swingGui.guiModule almuists/SwingGui.java
Reading config file /usr/local/amool/conf/amool.conf
Amool 1.3.8 compiler/parser v1.4.2 - by Maxime Gamboni
> javac -d lib almuists/*.java

Setting the ClassPath

I suggest to put almuists related classes in the lib subdirectory of the guiApi archive. To have Java be able to find them you should add the directory to your classpath (use export as below, or setenv, or whatever your shell uses as a syntax for environment):

> export CLASSPATH=<the directory containing the amool
code>/lib:$CLASSPATH

Compiling and Running the dynamic gui example

Now you can compile the classes in dynTest. Note that it defines two java classses, one for the main class and the other for the inner gui block.

> acompile @dynTest.mainClass almuists/DynTest.java
Reading config file /usr/local/amool/conf/amool.conf
Amool 1.3.8 compiler/parser v1.4.2 - by Maxime Gamboni
> acompile @dynTest.mainClass.sub almuists/InnerDyn.java
Reading config file /usr/local/amool/conf/amool.conf
Amool 1.3.8 compiler/parser v1.4.2 - by Maxime Gamboni
> javac -d lib almuists/DynTest.java almuists/InnerDyn.java

We can now run the application:

> java almuists.DynTest

Compiling and Running the external gui example

Let's now have fun with the external gui

> acompile @extTest.mainClass almuists/ExtTest.java
Reading config file /usr/local/amool/conf/amool.conf
Amool 1.3.8 compiler/parser v1.4.2 - by Maxime Gamboni
> javac -d lib almuists/ExtTest.java

We can now run the application:

> java almuists.ExtTest

You now can have try to modify the external gui in @extGui and re-run the application without needing to recompile it! :-)


Maxime Gamboni <>
Last Compiled: Fri Apr 25 23:21:42 CEST 2003