August 1, 2009

XCode and Subversion - 155005 Error

I was receiving the following error while trying to perform various SCM functions through the Xcode UI:

Error: 155005 (Working copy not locked; this is probably a bug, please report) Description: Directory 'XYZ/.svn' containing working copy admin area is missing

It turns out that I had added my build directory to my repository when I originally added my project. I removed the directory from the repository, removed my working copy, and then checked it out again. Problem solved.

Missing "DONE" button on Number Pad keyboard.

I'm working on an app that uses multiple UITextField controls that have their keyboard type set to "Number Pad." For whatever reason, Apple does not provide a done button for this keyboard type, despite providing one for every other keyboard type.

It seems there are 3 common ways to work around this:

1) Add a button next to the UITextField that is being edited. Only show this button when the keyboard is visible. This sounds like the easiest method, but is a bit ugly.
2) Add a transparent button that covers the entire view. Hide the keyboard when this button is clicked. I'm not sure about the details here. It seems like this would prevent others elements from being clicked, or you'd have to handle the click event for each control on the form.
3) Add a done button to the keyboard. This method probably requires the most work, but definitely provides a better user experience. The keyboard layout has changed slightly between SDK versions 2 and 3, so the OS version needs to be taken into account. The following site has detailed instructions for adding a button to the keyboard:

http://www.neoos.ch/news/46-development/54-uikeyboardtypenumberpad-and-the-missing-return-key