Support  

Docs Get started APIs Tutorials Sample codes How To Videos Forums FAQ Releases & Roadmap

Hello World! (Tutorial)
4/12/2011  

Creating a New Project

Start by launching Moscrif IDE. From menu select Project » New Project.If You have workspace loaded IDE display simple dialog. Enter the project name "HelloWorld". If You have not workspace loaded, IDE displays following dialog:

New workspace and project

Enter the workspace name (e.g. "TestSpace") and then project name "HelloWorld".

Your new project will now be created.

Coding HelloWorld!

Expand your workspace and find main.ms. Double-click on this file, source code editor appears. Here is the code we asked you paste into the IDE:


include "code://ui/application.ms"

var app = new Application();

app.onDraw = function(sender, canvas) {
    canvas.clear(0xffffffff);
    canvas.drawText("Hello world!", 100, 100, new Paint());
}

app.init();
app.run();

Running HelloWorld!

To compile your project and run it in the emulator, click the Run button, or press Ctrl+F5.

Emulator

Congratulations, you have now compiled and executed your first Moscrif application!

What next?

Check screen-cast of this tutorial here

Rating : 0.00
Comments (0) | View count : 152 x
» All Articles