Running XCode simulator results in “LaunchServicesError error 0.”

So, one moment you’re app was running fine in the simulator and the next moment you get an error saying  “The operation could not be completed. (LaunchServicesError error 0.)” Bummer! When you check your logs (see ~/Library/Logs/CoreSimulator/CoreSimulator.log or ~/Library/Logs/CoreSimulator/[Device UDID]/system.log) you’ll find errors like “/<app name>.app did not have a CFBundleIdentifier in its Info.plist}”. And when you check […]

Lees verder →

Javascript keyboard events: the difference between keypress and keydown

Some things you learn the hard way. I was trying to catch some keyboard events in order to replace comma’s with dots in html input items and validating the input against a regular expression along the way. The results I got were at best confusing, but never as expected.

I did some reading on sites like http://javascript.info/tutorial/keyboard-events, and found out there is a fundamental difference between the keypress and keydown event. This shows especially when catching the “.” “,” or decimal point (yes, the decimal point on your numeric keypad is another character!)

The next output is consecutively a comma, a dot, and a decimal point on the numeric keypad. The keydown and keyup event present values that are unexpected, like the ¼ character. Only keypress shows comma and dot as expected.

keydown keyCode=188 which=188 charCode=0 char=¼
keypress keyCode=44 which=44 charCode=44 char=,
keyup keyCode=188 which=188 charCode=0 char=¼
——————————
keydown keyCode=190 which=190 charCode=0 char=¾
keypress keyCode=46 which=46 charCode=46 char=.
keyup keyCode=190 which=190 charCode=0 char=¾
——————————
keydown keyCode=110 which=110 charCode=0 char=n
keypress keyCode=46 which=46 charCode=46 char=.
keyup keyCode=110 which=110 charCode=0 char=n

Remember this when getting unexpected results when grabbing key-events in your web application.

refreshing PL/SQL regions with AJAX in Oracle APEX

Not all regions in APEX can be refreshed using the PPR (partial page refresh) mechanism. Especially PL/SQL regions are difficult to refresh with AJAX.

Although… the fact that the HTML in a PL/SQL region is constructed in PL/SQL may be in your advantage. With the use of a tiny bit of JQuery and an application process, you will be able to update a region asynchronously. How? I’ve described that on the Whitehorses blog

It makes use of jQuery, an application process and the PL/SQL function you normally use in the PL/SQL region.

The latest Whitebooks: improving performance with OSB split-join and Behaviour Driven Development in Scrum

There are a couple of interesting new articles on the Whitehorses knowledge site. All in Dutch, but Google Translate can fix that for the none-Dutch speaking audience. Remco Cats has written an article about Behaviour Driven Development, a new concept in Scrum. It should help reduce the amount of left-over testwork at the end of […]

Lees verder →