Author Topic: Hello World  (Read 3614 times)

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 286
Hello World
« 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



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



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

« Last Edit: October 02, 2011, 11:31:52 AM by Malkom »
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

 

anything