|
How To Solve: XCode and (backwards) delete gives inverted question mark There are some programming days when code flows from your hands like honey, everything is easy, and the solution is both easy to see and easy to obtain. Then there are days you fight your computer over every. single. little. thing. Today was one of the latter days for me. I fix a bug in some of my software, but want to run the unit tests for that component. I have the tests, but they aren't integrated into the app yet, so I have another stupid test harness app, just to run the tests. Can't find it, have to recreate it. Whatever, it's mostly broiler-plate code (and a C++ template typedef) anyway. I fire up XCode, and find that my (backwards) delete doesn't work any more. More precisely, every time I hit the delete key an upside down question mark would show up on in the text. Now anyone who's been around the Mac for more than 2 seconds knows that this is the "I don't have a glyph to display that character" character. I made sure my keyboard wasn't in some weird mode, nothing worked. Whatever. I just want to get my job done, so I fire up BBEdit and edit all my code in that. Except I had to modify the include search paths. (which are displayed in a text field control which you have to specify your path the old fashioned way: by typing it. Yes, this totally sucks and goes against everything we know as Mac programmers ("Full Paths shouldn't be seen by users, except for display purposes, and even then it might be a bad idea.", and "Open/Save dialog boxes exist so that the user can specify file locations"). Whatever.) So I edit the search paths with the forward delete key. 9 uninformative compile errors, 10th time in the search paths dialog, and the 200th time of hitting (backwards) delete then having to go back (with the left arrow key) to correct my "mistake" in addition to the inverted question mark I got sick of it. As in throw your keyboard across the room sick of it. Yes, I need to hang out with calmer people, or drink less caffeine. Since I have a PowerBook, the fact that the keyboard was on the floor didn't bother me much, I would use the built-in keyboard. Except the question mark happened with that keyboard too. Now I use Custom Key Bindings to give me an environment similar to (I believe) Codewarrior 7. (Wasn't it CodeWarrior 8 where Metrowerks decided to make Cmd-R DEBUG, instead of Run? I like Run = Cmd-R.). I switched to XCode Default, and my problem went away. Good. Finally, progress. After going through and comparing the Text Key Bindings I finally found: Indent Friendly Delete Backwards, which wasn't set in my set, but was in the Default set. Assigned delete to be the shortcut for Indent Friendly Delete Backwards, and boom: properly deleting text. Now, with that solved, maybe I can get some work done. |