Blackberry Fix

blackberry, bug

Tue Apr 13 23:16:05 -0700 2010

I’ve noticed some application errors that are specific to Blackberry users when any form is submitted (i.e. a calculation is submitted).

I’ve found that the Blackberry device helpfully appends each select option with a trailing space, so if you select “Tartaric” from a drop-down menu, what is submitted to the application is “Tartaric ” (notice the trailing space).

This also goes for the numerator and denominator values (”g” becomes “g “, “gals becomes “gals “, etc.)

When the WineAdds application receives these form submission values, it puts them through a series of logical steps where the values “Tartaric”, “g”, “Gals” are looked up for their mathematical equivalent. Since I did not plan ahead for trailing spaces, “Tartaric ” and “g ” are not found and the application chokes and serves the user an error.

I’ve added a fix that removes any extraneous trailing spaces (or leading spaces, for that matter) from form submit values to solve this problem for Blackberry users.

blog comments powered by Disqus