Enabling Copy and Paste in a WebWorks app for the BlackBerry PlayBook

When redoing my BlackBerry PlayBook app Temp Notes with web technologies and RIM’s WebWorks SDK, I was able to make the app much better, however a critical feature was missing: copy and paste. After frantically search the support forums and tutorials, I was still without a solution of how to enable this. Funny enough, it is actually super simple to do so. I knew of one PlayBook app made using WebWorks had figured it out, so I emailed the great team behind the great news app Glimpse, and they provided the solution:

In order to get “copy/paste” functionality working inside your WebWorks app you should do the following:

  1. Locate the SDK installation directory (where bbwp is located)
    Should be something like: ”/Developer/SDKs/Research In Motion/BlackBerry WebWorks SDK for TabletOS 2.0.0.4″ (if you are using an Apple computer).
  2. Inside that directory, locate the AirAppTemplates source folder: ”bbwp/AirAppTemplates/src”
  3. Edit the file “blackberry-tablet.xml” and set the following values to “true”:
  • WEBKIT_CONTEXT_MENU_SUPPORTED
  • WEBKIT_SELECTION_SUPPORTED

Note: This will enable the functionality for all applications that you compile using that modified SDK file.

You should also note that if there is an update to the SDK the file might be overwritten by the new installation so be sure to back it up.

Such a simple solution, I was kicking myself for how much time I had wasted trying to figure it out!

This entry was posted in Uncategorized. Bookmark the permalink.

Comments are closed.