NSAlert + Sheets + Threads = Inexplicable Bugs
UPDATED 2008-12-26: in general, all AppKit code should be called on the main thread. Problem: When using an NSAlert to display a sheet in a multi-threaded application, unexpected badness can happen. I...
View ArticleObjects that Won’t Hide
NOTE: Although this specific Bug Bite is about NSTextView, and the “hidden” property, the same underlying issue applies to other interface-objects (NSTableView, etc.), and different properties, like...
View ArticleLocalizing In Xcode
Let me say this again in slow motion: NEVER type in ANY English string without typing NSLocalizedString() around it! This will save you SO MUCH HASSLE later on when your app is popular. Remember that...
View ArticleTwo Help Menus
I ran into an issue at work where sometimes an application would have two “Help” menus, on OS X 10.5 “Leopard” (but not on OS X 10.4 “Tiger”). The problem was interacting with the UI before the...
View ArticleOne assert() You Need?
Accidently disconnected outlets in shipping Cocoa apps are legend. — Jonathan “Wolf” Rentzsch From what I can tell assert() is slowly going the way of the goto in the programming world. Exceptions,...
View ArticleUndocumented Automator.framework Goodness: Actions Library
In Leopard, Apple introduced AMWorkflowView and AMWorkflowController, which let you easily add automator-editing capabilities to your application (modulo bugs!) Obviously, for editing a workflow to be...
View ArticleAlways Update the View From the Main Thread
I wish I’d read this years ago: AppKit, the GUI framework, is not thread safe. In order for things to work properly, you (almost) always need to update GUI classes from the main thread —Dave Dribin...
View ArticleReverse Engineering Inter-Process Communication
Matt Gallagher tells how he reverse engineered the link between Xcode and Interface Builder. Very interesting, I learned a lot. I’ve done essentially the same thing with iChat. (And in retrospect it...
View Article