Create your first WRT widget using an IDE
In this article we'll show how to create and test the "HelloWRT" widget in Aptana Studio 1.5 with Nokia WRT Plug-in. You can use the same files created in article Create your first WRT widget. After you have installed the Aptana Studio and Nokia WRT Plug-in as instructed in Web Runtime Tools at Nokia Developer, do the following:
- Select File > New > Project.
- Under Nokia Web Runtime (WRT) select New Nokia Web Runtime Widget and click Next.
- Select Basic Widget Project and click Next.
- Provide a name for the project and choose a location if you don't want to use the default location.
- Specify a name and an identifier for the widget, or use defaults. You can leave Enable HomeScreen unselected for this widget. If it is selected, it means that the widget should have a static part to be shown on the home screen of the device. Because this example "HelloWRT" widget does not have such a part, this option can be left unchecked.
- The plug-in has now created the project for you with all the needed files for the WRT widget. You can copy the code of the "HelloWRT" widget created in the article Create your fist WRT widget to the index.html, basic.js, and info.plist files, and paste them to the similar files created by Aptana.
- The Nokia WRT Plug-in has a preview possibility, so an SDK or a device is not necessarily needed to see what the widget looks like. When the index.html file has been selected, choose Nokia Web Runtime (WRT) from the bottom of the editor panel.
- To make a .wgz package in Aptana, right-click the mouse button over the project name in the project tree and select Package Widget.
- To run the widget in the the device or an emulator, select Widget Deployment Settings.
- Next, choose either a device, which you have connected to your PC, or the SDK you have installed earlier.
- To deploy the widget, choose Deploy Widget.