NYC Developer Day 2010: Wrapup and photo highlights

5 BY Lisa Brewster

Last weekend we held our second two-day developer event, and it was twice as epic as the first. Developers from 32 states and 9 countries joined us in New York City for presentations on everything from webOS fundamentals to the future of cross-platform development.

Read more

Topics  Events

Using Services in PDK Apps

1 BY sfeaster

I thought it might be helpful to cover some of the basics of making service calls in PDK apps, as well as point out some possibilities for those of you either new to PDK development or new to using services.

One quick note: While one-shot service calls work just fine, there are a few known issues when using services in PDK that require subscriptions. These will be fixed in a future release. With that in mind, you’ll still find that there are a lot of useful services to take advantage of in your apps.

Read more

Mapping Cats with Ares

0 BY devrel

One of the great unsung webOS tools is Ares. The Ares visual IDE lets you build and test webOS apps quickly. So quickly in fact, that it can be used to catch cats…

A couple of weeks ago, I attended the Civicwebs Hackathon in Portland. This is an all day event where local hackers get together to build code for the benefit of the city. Mostly, these revolve around producing or consuming local government data in interesting ways that will benefit the populace. One of their most intriguing projects is the CatMapper.

Read more

Topics  Featured Apps

How to add line breaks to your app description in the catalog

2 BY enda

Have you been frustrated trying to put line breaks into you app description but just ended up with a single paragraph?

Well if it makes you feel any better you are not alone. Some very savvy developers in the forums tackled the issue determined to find a solution and did!

The problem is that html engine is not escaping by default and so the line breaks are being seen as white spaces and ignored. As discovered by forum member “siburny” the problem code is

if (val.indexOf('<') !== -1 || val.indexOf('&') !== -1) {
var renderingDiv = document._renderingDiv;
renderingDiv.innerText = val;
var escapedValue = renderingDiv.innerHTML;
val = escapedValue;

So the solution is to have an ampersand somewhere in your description. Having the “&” causes the template processor to run extra processing on your text, which includes converting the line breaks into <br> tags.

A simple and clever way to do this would be to replace “and” with an ampersand, for example Comments & feedback welcome.

As a side note, you only need to do this for devices on 1.4.5 and lower. The issue has been fixed for the 2.0 catalog.