I've made a HelloWorld with "jiggy", the javascript-based IDE for iPhone/iPod touch. I'll show the steps.
Login to jiggy
- launch jiggy in your iPhone/iPod touch.
- access to jiggy with the browser of your Mac/PC. the IP to access is on the screen.
- login to jiggy with the User name and the Password on the screen.
Create new application -- HelloJiggy
- click "Create new application" on the left navigation.
- input "Title" and "Identifier." Below is an example. ("Description", "Version", "Author", "URL", "Icon" are your options)
Title: HelloJiggy
Identifier: jp.kamonama(.hellojiggy)
- click "Save" below the form.
- it's ok that your iPhone/iPod touch has been locked.
Hello jiggy!
- unlock your iPhone/iPod touch and launch jiggy.
- access to jiggy.
- click "HelloJiggy" come up on the left navigation.
- click "main.js" in the "HelloJiggy" folder.
- write the code below in main.js.
Plugins.load( "UIKit" );
var rect = UIHardware.fullScreenApplicationContentRect
rect[0] = rect[1] = 0;
var window = new UIWindow( rect );
window.setHidden( false );
window.orderFront();
window.makeKey();
window.backgroundColor = [ 1.0 , 1.0 , 1.0, 1.0 ];
var hello = new UITextLabel( rect );
hello.text = "Hello jiggy!";
hello.backgroundColor = [ 0.6 , 0 , 0 , 1.0 ];
hello.setFont( new Font( "Trebuchet MS" , 2 , 46 ) );
hello.color = [ 1 , 1 , 1 , 1 ];
hello.centersHorizontally = true;
window.setContentView( hello );
- click the floppy-disk icon to save main.js.
- click the right-pointing triangle icon to run HelloJiggy. (or tap the HelloJiggy icon on the spring board of your iPhone/iPod touch.)
- Congratulation! HelloJiggy is running, now!
0 件のコメント:
コメントを投稿