Introduction

  • The plug-in is currently supported on Microsoft Windows XP, Vista, and Apple Mac OS X.
  • The plug-in may be used with standalone version of Aptana Studio 1.2 or Aptana Studio 1.2 plug-in for Eclipse 3.4.

For more complete details on using the plug-in, find the Nokia WRT Plug-in for Aptana Studio QuickStart Guide on Forum Nokia. This is an excellent overview of using the Web Runtime Plug-in for Aptana Studio.

Tips, Tricks, Known Limitations and Issues

Installing and Upgrading

  1. Users upgrading from 1.0 WRT Plug-in:
    Project Migration
    This release of the plug-in has significant changes to the Preview features. When Aptana is restarted after WRT plug-in installation, older projects in need of migration are automatically highlighted with red icons. It is strongly recommended that you use the Upgrade Project contextual menu option to migrate the project to current release of WRT plug-in. Otherwise the preview features will not work correctly. Click anywhere on your WRT project to find the contextual menu.
  1. Uninstall: If for some reason you want to revert to an older version, you can use the Eclipse uninstall feature. However, if for some reason you want to do a clean uninstall the WRT plug-in, you should:
    1. Go to Aptana Studio Plug-ins Manager and disable the plug-in.
    2. Restart Aptana Studio.
    3. Go to Aptana Studio Plug-ins Manager and uninstall the plug-in.

    If you have to manually uninstall the WRT plug-in do the following:

    1. Quit Aptana.
    2. In the Aptana installation directory (something like C:\Program Files\Aptana\Aptana Studio 1.2\ on Windows) open the features directory and delete all items beginning with com.nokia and org.eclipse.emf.
    3. Repeat the steps above for the in the plug-ins directory.
    4. On Mac OS, delete the directory ~home/Library/ApplicationSupport/Aptana.
  2. Firewalls and proxies: If your internet connection requires a proxy setting, you must set it directly within Aptana Studio. If you do not, this could affect your ability to install plug-ins or preview widget content. There are two places to set proxies in Eclipse:
    • Window > Preferences > Internet Proxy Settings
    • Window > Preferences > Install/Update
    Be sure and set both appropriately for your proxy configurations. See your Network administrator if you do not know the proxy configurations for your network.

Working with Web Runtime API

  1. Supported APIs: The current release of the WRT Plug-in supports most of the WRT Service 1.1 API and its features. This includes:
    • All services and service APIs
    • Both Sync and async variations
    • Argument checking, that the correct number of arguments is passed to an API and if API supports sync/async call
    • Criteria handling, e.g., Type, id, LocalID, MessageType, etc.
    • Returning correct error codes
    • Returning correct error message
    • Returning correct result object
    • Returning sample data in correct format
    • Adding / updating / deleting sample data
    • Cancel async invocations
    • Register for Event/change notification

    The following features are not yet supported:
    • Extended Filter parameters
    • Sort parameter
    • Any Data checking, i.e. new calendar entry field name is blank or too long, etc.
    • Import/export
    • Message send
  2. Event Notification
    • In the Logging API, the function called for getting logging event is RequestNotification() takes one criteria parameter DelayTime (time after which event should be generated). Because this function is time specific, the implementation notifies caller by calling specified callback function after DelayTime interval is passed.
    • In the Location API, the Trace() function is called for getting event notification. No more than one call to trace can be in pending state at anytime, This function takes one criteria parameter UpdateInterval (after this interval new location should be fetched). Because this function is also time based it doesn’t need any UI for event generation. Once called this function keeps on fetching new location after specified UpdateInterval until CancelNotification is called.
  3. In Location API there are few parameters in Trace() and GetLocation() methods that are very much device specific and irrelevant for preview so for them only error check is implemented. However, they don’t affect functionality.
    • UpdateTimeOut: Timeout is a device specific feature which depends on GSM signal but in preview it ’s guaranteed that every call will succeed so this parameter is not relevant for preview.
    • UpdateMaxAge: This parameter is related to device cache management and used to avoid use of GSM receiver (which is time taking and power consuming). But in preview GSM location is always returned from available database. So this parameter is also not relevant.
    • PartialUpdates: This parameter is used to guarantee that Basic location information is always received if it takes time to get Generic location information (which contains more information than basic location info), so this is also not relevant.

Working with Widgets

  1. Automatic Building: In Aptana Studio it is recommended that you leave the Automatic Build option under the Project toolbar menu selected. However, if it is left unselected, you will be prompted for a build during the creation and importing of new projects. This will create the preview related files and folder (see Recreating Project Preview).
  2. Debugging requirement: Debugging Web Runtime widgets requires the usage of Mozilla Firefox.
  3. Recreating Project Preview: When you create a project the following are created for you:
    • art_preview_main.html
    • wrt_preview_frame.html
    • Preview (folder)

    WARNING: Do not delete or edit these files. If you delete or edit these files they will be out of sync with the project and the preview may not function correctly. To recreate files, do the following:
    1. Copy the widget files to your desktop from your Project Workspace.
    2. Delete the files and folders listed above. Be sure you completed step 1 above.
    3. In Aptana Studio, delete the entire WRT project by right clicking on the Project folder.
    4. Use the Project Import feature (File > New > Project > Import Web Runtime Library to re-import the widget from your desktop. You should now have all the required preview files in place.
  4. Screen Resolution links to devices: The screen resolution links to Nokia devices in the preview window will not currently work while previewing the widget inside Aptana. They will work while previewing the widget in external browser.
  5. Project Name restriction: Please avoid these characters ('#','$','^','%') in WRT project names. Please also avoid using project names longer than 50 characters.
  6. File exclusion icon: The project icons showing a line through a red circle indicate an excluded file, when the widget archive is created. You can include or exclude files or folders by right-clicking on them and toggling Exclude from widget archive or Include from Widget Archive. You can use excluded files to keep assets related to your project in the Project Workspace without including those files in the final widget archive.
  7. File exclusion: Avoid excluding the main HTML file in widget. There must be one main HTML file in the widget.
  8. Deleting Projects & Files: It is strongly recommended that if you have a need to delete projects and related files then please do so through the IDE instead of doing it directly via the file system. Otherwise unexpected behavior may be observed with the projects.
  9. Multi-Project Operations: While doing multi-project operations such as delete or Update in Aptana Project Explorer view you should only select the project folders themselves and not the contents inside the folders. Otherwise the multi-project menu options may be disabled. The easiest way to select the project without any of the contents is to collapse the projects before selecting any of them to complete the intended operation.
  10. Preview issue: If your widget content is bigger than the selected screen dimension and you don &#146;t set the { overflow:auto; } or { overflow:scroll; } CSS property for <BODY> tag, the preview in Aptana may prevent you from being able to scroll in the widget. If you preview the widget in an external browser such as Safari, Chrome, or Internet Explorer, you will see scroll bars. Note you would not see scrollbars on the device in this case however, so the preview in Aptana does not show them. You can set scroll bars using WRTKit UIManager Class.
  11. JavaScript Prompt issue: Currently JavaScript prompt() does not work while previewing widgets using Firefox.
  12. Flash Content: For widgets with Flash content, the default behavior of the flash content is always placed on the top of all the content layers. This can be fixed by adding the following property. <param name="wmode" value="transparent" /> .
  13. Running the Widget: You can run the widget on an external browser (Firefox is recommended for widget preview and debugging) by clicking the Run or Run As button in Aptana Studio. For launching widget with the Nokia WRT preview, you must select 'wrt_preview_frame.html' file from the desired Aptana widget project and then press the Run button.
  14. Using S60 Emulator: If you are deploying the packaged widget to the S60 device emulator, you need to either start the emulator manually or reopen the widget application to see the changes.
  15. Minimizing a widget: Sometimes the Red (Call end) button needs to be clicked twice for home screen enabled widget to close to the miniview from a full screen view.
  16. Project Location: On Mac OS please select the Default Location option in the wizard while creating new projects. Choosing alternate locations currently has unpredictable results.
  17. Aptana restart issue: On Mac OS if Firefox is used as the WRT preview browser then you may run into a situation where if Aptana is closed with a preview left open, then Aptana might hang on restart. Because of this reason on Mac OS WRT plug-in will automatically close any open preview if Firefox is the WRT preview browser of choice. If you still run into a situation where Aptana hangs during restart please try deleting this file ~/Documents/Aptana Studio/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml.
  18. Bluetooth Pairing: To deploy a widget to a device from Microsoft Vista, the device must be paired with the host bluetooth prior to the deployment of the widgets. This is not required on either Windows XP or Mac OS.
  19. HTTP Access Control If you are calling remote data via XMLHttpRequest(), you need to take a few additional steps to make the call successfully within the Firefox preview. See HTTP access control for more information.
    1. For Firefox 2.x and 3.x, Mac OSX and Windows add this line of JavaScript code before calling each XMLHTTPREQUEST.open function.

      // create XmlHttpRequest Object
      var xmlhttp = new XMLHttpRequest(); // Enable Universal Browser Read
      try{
      netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); }
      catch(e){ } // before each
      xmlhttp.open(METHOD, URL);

      This needs to be also done for imported widgets that use XmlHttpRequest and do not already utilize these steps.
    2. Open Firefox browser and navigate url 'about:config'
      Search this property by using the filter 'signed.applets.codebase_principal_support' and set the Boolean value to 'true'
    3. On Mac OSX you may have to additionally find the property 'security.fileuri.strict_origin_policy' and set its Boolean value to 'false'

    WARNING: Be sure to set the 'signed.applets.codebase_principal_support' to 'false' and 'security.fileuri.strict_origin_policy' to 'true' when your debugging is complete to ensure browser security.

    Additional Reference links on access control

Help and Discussion Groups

Help

Discussion groups