|
|
Version 0.8.0 Alpha
|
|
|
Portal to the Milescript open-source development community.
|
In this tutorial, we will create a Hello World application in the Milescript Eclipse Plugin, dubbed MSEclipse.
The first thing you'll need to do is install the MSEclipse plugin. For an explanation of how to do this, see the Installing MSEclipse Tutorial.
If you already know how to install an Eclipse plugin, the update url is:
- http://www.milescript.org/mseclipse/update
|
After you have the plugin installed, open the Eclipse program and switch to a clean workspace. Open the "Milescript View" using the "Window" menu.
Open a clean workspace
|
Select "Other" on the "Show View" sub-menu
|
|
Select "Milescript View" from the options listed.
|
Move the view to wherever you like, right click on the background and select "New Project."
|
|
Select "Milescript Project" and click "Next."
|
|
Type "HelloWorld" for the Project Name and press "Finish."
|
|
Your Milescript View should look like this...
Since we'll be using the LibDom module, we'll need to import it into our project. Right click on the HelloWorld project and select "Properties."
|
|
|
Select the "Milescript" properties panel.
|
|
Click the "Add MAR Lib" button and add the "libdom.mar" library.
|
|
Press the "Ok" button.
|
|
Now you can write some Milescript. Open the TestMain class and insert the following code...
|
|
Congratulations, you just created your first Milescript program using the MSEclipse plugin.
The Milescript Compiler has generated a Javascript file and placed it in the "bin" directory.
You can have the Compiler copy this output to another directory for deployment. This directory could be, for example, a folder which is hosted on the web.
In order to run the program, you must import the generated Javascript file into a webpage using HTML, and call the "initApp();" method on the body "onload" event, or anywhere else you like.
For more information about the plugin, check out these other MSEclipse tutorials.
Deploying in MSEclipse | Unit Tests in MSEclipse
|
|
|
|
|
|