HyperNext Android Creator

Finding help on HAC => Script Projects => Topic started by: Malkom on October 02, 2011, 07:05:22 AM

Title: Hello World
Post by: Malkom on October 02, 2011, 07:05:22 AM
HELLO WORLD

This uses one button that when pressed displays a Dialog Box with 'Hello World' message.

http://www.hypernextandroid.com/ScriptSampleImages/Hello_World_Card.png (http://www.hypernextandroid.com/ScriptSampleImages/Hello_World_Card.png)



COMPARE WITH JAVA

Lines of code (not counting empty lines and comments):-
HAC: 1
Java: 13

The Java version has more lines because it sets ups its display using code whereas HAC sets it up with is screen designer.
The Java version also needs an XML file to define its display.
http://developer.android.com/resources/tutorials/hello-world.html (http://developer.android.com/resources/tutorials/hello-world.html)



HOW TO

1) Create a new projected called Hello World.

1) On the card create a button.

2) Give the button some text Hello using the Creator Properties toolbar - Value tab.

3) Open the button's script and give it this code:-

Code: [Select]
Message 'Hello World'


NOTES
The title of the dialog box is always the same as the project, in this case 'Hello World'.
The message is the smaller 'Hello World' text below it.



DEVICE SCREEN SHOT

This a screen shot of it running on an Android G1

http://www.hypernextandroid.com/ScriptSampleImages/Hello_World.png (http://www.hypernextandroid.com/ScriptSampleImages/Hello_World.png)