Release Notes - webOS SDK 3.0.2 (Build 652)

This is the SDK for webOS 3.0.2, the first over-the-air update for webOS 3.0.


Documentation

To view the full documentation set for the SDK and PDK, open the appropriate file for your platform in a WebKit-based browser:

  • Windows (32-bit)

    C:\Program Files\HP webOS\SDK\share\refcode\webos-framework\enyo\1.0\support\docs\sdk\docs.html
    
    
  • Windows (64-bit)

    C:\Program Files (x86)\HP webOS\SDK\share\refcode\webos-framework\enyo\1.0\support\docs\sdk\docs.html
    
    
  • Mac/Linux

    /opt/PalmSDK/Current/share/refcode/framework/enyo/1.0/support/docs/sdk/docs.html
    
    

Code Resources - Enyo

Reference code, sample code, and template apps for the Enyo framework are available in the following locations:

  • Windows (32-bit)

    C:\Program Files\HP webOS\SDK\share\refcode\webos-applications\enyo
    C:\Program Files\HP webOS\SDK\share\refcode\webos-framework\enyo\1.0\framework
    C:\Program Files\HP webOS\SDK\share\refcode\webos-framework\enyo\1.0\support
    
    
  • Windows (64-bit)

    C:\Program Files (x86)\HP webOS\SDK\share\refcode\webos-applications\enyo
    C:\Program Files (x86)\HP webOS\SDK\share\refcode\webos-framework\enyo\1.0\framework
    C:\Program Files (x86)\HP webOS\SDK\share\refcode\webos-framework\enyo\1.0\support
    
    
  • Mac/Linux

    /opt/PalmSDK/Current/share/refcode/applications/enyo
    /opt/PalmSDK/Current/share/refcode/framework/enyo/1.0/framework
    /opt/PalmSDK/Current/share/refcode/framework/enyo/1.0/support
    
    

Code Resources - Mojo

Reference code and sample code for the Mojo framework, which shipped with webOS 1.x and 2.x, may be found in the following locations:

  • Windows (32-bit)

    C:\Program Files\HP webOS\SDK\share\refcode\webos-framework\mojo
    C:\Program Files\HP webOS\SDK\share\samplecode\mojo
    
    
  • Windows (64-bit)

    C:\Program Files (x86)\HP webOS\SDK\share\refcode\webos-framework\mojo
    C:\Program Files (x86)\HP webOS\SDK\share\samplecode\mojo
    
    
  • Mac/Linux

    /opt/PalmSDK/Current/share/refcode/framework/mojo
    /opt/PalmSDK/Current/share/samplecode/mojo
    
    

Code Resources - PDK

Sample code using the Plugin Development Kit is available in the following locations:

  • Windows (32-bit)

    C:\Program Files\HP webOS\PDK\share\samples
    
    
  • Windows (64-bit)

    C:\Program Files (x86)\HP webOS\PDK\share\samples
    
    
  • Mac/Linux

    /opt/PalmPDK/share/samplecode
    
    

The following items have changed since the 3.0.0 release:

Enyo Framework

This release of Enyo is highlighted by extensive documentation updates, the removal of extraneous logging code and error messages regarding the Tellurium service, and numerous bug fixes, particularly in the areas of keyboard use and input focus.

Individual changes are listed below, by category.

Keyboard

  • Added compatibility with non-virtual keyboard devices.
  • Updated to use new keyboardShown event.

DOM

  • calcNodeOffset no longer returns height/width.
  • Updated calcNodeOffset to use getBoundingClientRect instead of custom implementation.

Events and Gestures

  • Factored "focusAtPoint" code to device section, re-enabled requiresDomMousedown processing, and added support for detecting if a drag axis is lockable.

  • When focusing node, prevent corner case error (focus before body is ready) by not blurring the activeElement if it does not exist.

  • Use focusAtPoint API via PalmSystem.simulateMouseClick to truly defer focus until mouseup on device; maintained fallback for browser; removed begin/end prevent focus method.

  • Dispatcher:

    • Return value from broadcastEvent(). If any listener returns true to the event, return true to the event originator.

    • Added mousewheel event.

    • Do not allow capture of events that are handled by enyo.dispatcher.rootHandler (no other valid Enyo target control).

  • Gesture/Input/BasicInput: Corrected order of events so that click is always processed after blur, focus, and change. Also refactored method of forcing an input to be focused when its chrome is tapped.

  • Gesture:

    • Slightly refactored device/browser differences; worked around async focusAtPoint issue--focusing at point is aborted if mousedown target has changed during focusing.

    • Squelch clicks whenever there is a DOM gesturestart event. Previously, Enyo squelched clicks after drags, but the event flow changed recently, causing the mousemove event to sometimes not be sent when in a gesture event sequence. Now Enyo specifically squelches in this case.

    • Focusing inputs now displays keyboard and tap-highlight color is set to transparent.

Popups and Dialogs

  • BasicPopup: Do not squelch focus and blur events.

  • Popup/BasicPopup: If an element in a popup is focused when the popup closes, blur it.

  • Popup:

    • Removed enyo-popup-float class, which is no longer needed.

    • openAt method can optionally reposition the popup instead of resizing it to stay in view.

  • PopupLayer: Prevent decoration of the body tag with class or id.

  • DatePicker now changes dates correctly from February 29 (leap year).

  • FilePicker: Made File Picker dialog bigger. Also set the border image and width for the FilePicker container.

  • HelpMenu now allows use of URLs outside the palm.com domain; these will launch the Browser app instead of the Help app.

  • MenuItem: Increased caption line height so that letters are not cut off.

  • ModalDialog now fades in and out by default.

  • Fixed population of pickers when some pickers are hidden.

Controls

  • Animation: Added a flag to always play the animation, even when node is hidden.

  • BasicCarousel: Need to preventClick when we are preventing drag because snapping is not done.

  • BasicInput/BasicRichText: Set requiresDomMousedown to false on devices with focusAtPoint API.

  • BasicInput/BasicRichText/Input: Added ability to focus or blur synchronously.

  • BasicScroller:

    • When resizing, correct scroll position synchronously with newly added stabilize method; this prevents a problem when calling window.caretRect (keyboard keeping input in view code) while scrolling.

    • Ensure that if getOffset is called on children of scroller when it is out of position, it will return their in-bounds position.

    • Corrected scrollTo so that arguments may be omitted.

    • Fixed typo in scrollIntoView that prevented it from working for left-to-right scrolls.

  • CustomListSelector:

    • Reverted previous item location: at the left of the ListSelector.

    • Added contentPack property ("start" (default), "center", "end") to control where the content (item + client region) is displayed inside the ListSelector.

    • popupAlign is published and documented.

  • DbList/VirtualList:

    • Refactored punt method so that it works as expected for VirtualLists.

    • Updated "PagedVirtualList" example so that it calls only punt.

  • DragScroller/ScrollStrategy: Added mousewheel support.

  • Flyweight: Avoid problem with canGenerate: false controls by removing node access (via teardownRender) if it cannot be found in flyweight context.

  • Hybrid: Added passTouchEvents property.

  • Iframe:

    • Added tabIndex property; set tabIndex to -1 when iframe is hidden to work around WebKit bug (hidden iframes can be focused).

    • Scroll into view any scroller that has scrollOffsetIntoView method.

  • Input:

    • Fixed bug: Clicks on input chrome should not blur input if it is focused.

    • Prevent internal blurs only if input has focus.

    • Fixed disabled placeholder color to match disabled input with text.

  • ListSelector: Altered styling to allow for a larger tap area.

  • Maps: Optionally allow use of mouse events when touch events are not supported.

  • RichText:

    • forceSelect makes sure to focus the RichText first.

    • Added new methods: removeSelection, modifySelection, moveCursor, moveCursorToStart, moveCursorToEnd, selectAll, and insertAtCursor.

    • Fixed rich text hint color.

  • RichText/BasicRichText: Setting a value now works correctly when done in an onfocus handler.

  • RowGroup:

    • Corrected show/hideRow to work with expected index.

    • getControls does not include controls automatically inserted for item styling.

    • indexOfControl should return the expected index.

  • Scrim:

    • Added transparent property and on-demand rendering.

    • Transparent scrim singleton now does not animate when showing.

    • Scrim fades in by default. Added showingClassName property, which is a CSS class added to popup when it's shown; animateShowing property, which can be set to false to avoid animating when showing; and enyo-scrim-transparent class, which should be set as showingClassName for a transparent scrim.

    • Removed fadeout animation to address bug (Scrim remains transparent and showing when parent is hidden while scrim is animating to hidden).

  • ScrollingList: Allow access to flyweight node after rendering or refreshing; this ensures that dynamically-added controls do not have a node access state out of sync with flyweight and fixes the "SelectableVirtualGrid" example.

  • SearchInput: The hint text "Search" in the search input fields was missing its $L, so it was not being translated.

  • SizeableImage: Refined image zooming code.

  • SlidingPane: Refined resize handling to control order and frequency of resize messages.

  • SlidingView:

    • Removed unnecessary offset correction in calcControlOffset.

    • Automatically propagates a resize message when it is resized; this is in addition to the resize event.

    • Added overslide dampening.

  • Toolbar now fades correctly when fadeOnKeyboard is true.

  • ToggleButton: Altered styling to allow for a larger tap area.

  • VirtualList: Added comment about potentially using update instead of refresh in resizeHandler.

WebView

  • BasicWebView:

    • Update hint text in fs flash.

    • Prevent flick event from bubbling.

  • WebView:

    • Fixed bug that could cause requests to be redirected to the Browser app.

    • Provide default response to dialogs.

    • Made saveViewToFile protected, since it can only write to /var, which makes it not useful for non-Palm apps.

Multimedia

  • Added new mediacapture library.

  • enyo.Sound: Added audioClass property.

  • enyo.Video: Added loop and fitToWindow properties.

Globalization

  • Relative date formatting for dates more than a year apart now produces reasonable output.

  • Setting "weekday: true" as per the documentation didn't format dates as expected. The code has been updated to accept "weekday: true", while still accepting the "weekday: <length>" syntax previously used. The relevant documentation has also been updated.

  • Made a fix to ensure loading of the region-specific json config file, rather than the language-specific one, so that the locale for number and currency formatting may be specified with a language that does not usually go with the region--e.g., "en_es". Before this fix, the confusion between language and region meant that the wrong config file might be loaded.

Dashboard

Make sure Dashboard components are destroyed when windows close, taking orphaned dashboard windows with them.

Utilities/Clipboard

Use enyo.keyboard.suspend and resume for getClipboard and setClipboard.

Enyo Applications

The Enyo Calendar application now supports the "launch to date" feature available in Mojo.

Mojo Framework

  • The problem with scrolling in the WebView widget has been fixed.

  • The PeoplePicker API is now working properly.

  • The issue with some apps freezing after a back gesture while running in compatibility mode has been fixed.

webOS Services

A new service, Firewall (com.palm.firewall), is now available in webOS. Its one method, control, opens a port on the firewall.

The control method takes one argument, an object of the following form:

{
  "subscribe" : boolean,
  "rules"     : [
      {
          "protocol"           : string,
          "destinationPort"    : number,
          "sourcePort"         : number,
          "operation"          : string,
          "source"             : string,
          "destination"        : string,
          "interfaceName"      : string,
          "interfaceDirection" : string
      }
  ]
}

If subscribe is set to true, the firewall port will be opened until the subscription ends. This ensures that when your service or app goes away, the firewall won't be left open.

rules is an array of objects, each having the fields shown above. The protocol and destinationPort fields are required; the value of protocol must be either "TCP" or "UDP", while destinationPort is a port number greater than 1023.

Tools and Installers

SDK Installer

Reference source code is now included for the Browser, Email, Maps, Messaging, and Photos applications.

Windows SDK

  • The Windows SDK Installer now includes PuTTY version 0.61.

  • Shortcuts are now removed after complete uninstall on 32-bit Windows Vista.

  • palm-package no longer corrupts UTF-8 chars in localized appinfo.json files.

  • palm-package no longer double-encodes multi-byte chars in application titles in generated packageinfo.json files.

MacOS SDK

  • The Mac installer has been updated for compatibility with Mac OS X 10.7 (Lion).

  • The ".plist" extension has been added to Mac OS X LaunchDaemon files.

Linux SDK

  • Numerous scripts, including palm-run, pdk-device-install, and nova-browser, have been fixed in the Linux SDK.

Emulator

  • Fixed problem with Mojo apps' displaying white screen when running in compatibility mode.

  • The SHIFT key now works for number keys in the webOS Emulator.

  • Added PDF Viewer app to Emulator build.

  • Added support for VirtualBox 4.1.

Plugin Development Kit

New PDK Methods

The following methods have been added:

  • int PDL_HandleJSCalls(void)

    Calls the handlers for any pending downstream JS calls that are in the queue. Returns the number of calls handled, or -1 if there was an error.

  • PDL_bool PDL_IsPoller(PDL_JSParameters *parms)

    Returns true if the params are being handled by a polling handler, or false if they are being handled immediately.

  • void PDL_Log(const char *format, ...)

    Logs to the file /media/internal/tracking.txt under the category "pdl_log".

  • PDL_Err PDL_LoadOGL(PDL_OGLVersion version)

    Dynamically opens a specific version of OpenGL, where the version parameter is one of the following:

    typedef enum PDL_OGLVersion
    {
      PDL_OGL_1_1 = 0,
      PDL_OGL_2_0
    } PDL_OGLVersion;
    
    
  • PDL_Err PDL_RegisterPollingJSHandler(const char *functionName, PDL_JSHandlerFunc function)

    Same as PDL_RegisterJSHandler, but instead of the JS handler being called immediately, the request will be put in a queue, and an event will be posted to SDL to alert you. You must call PDL_HandleJSCalls to have the actual handlers be called. This approach ensures that the handlers are called in your thread (as opposed to PDL_RegisterJSHandler, which calls them immediately from an internal PDK thread).

    The event you get is SDL_USEREVENT, and the event's user.code value is PDL_PENDING_JS.

  • PDL_Err PDL_SetAutomaticSoundPausing(PDL_bool AutomaticallyPause)

    Enables or disables automatic sound pausing when carded. When set to PDL_TRUE, sounds will be paused at a system level (not affecting the pause state apparent to the app) when the app is carded. When set to PDL_FALSE, no special sound-related actions are taken when carded. The default value is PDL_TRUE.

New Key Code

A new key code has been added to detect taps on the virtual keyboard's "dismiss" key:

PDLK_GESTURE_DISMISS_KEYBOARD = 24

PDK Bug Fixes

  • The original webOS 3.0.0 release did not have a working virtual keyboard for PDK apps. If you tried to use it, you would see display artifacts on the screen. This has been fixed in 3.0.2. The keyboard also now works in all orientations, depending on the value used for PDL_SetOrientation.

  • Support for opening ports in the firewall using the PDL_SetFirewallPortStatus API was broken in webOS 2.0 and later. This is fixed in webOS 3.0.2.

  • Rendering speed for hybrid applications has improved considerably.

Code Samples

A new Enyo sample called "Services" demonstrates the use of system services.

Documentation

New documentation has been added in the following areas:

Developer Guide > Developing Enyo Applications > Controls

  • People Picker

Reference > PDK > PDL

  • PDL_HandleJSCalls
  • PDL_IsPoller
  • PDL_LoadOGL
  • PDL_Log
  • PDL_RegisterPollingJSHandler
  • PDL_SetAutomaticSoundPausing

Reference > webOS Service APIs

  • Firewall
  • Touch2Share

Known Issues and Limitations

Documentation

When viewing the documentation in the Chrome browser, links may not work correctly unless you have launched Chrome using the --allow-file-access-from-files command-line switch.