NSDocument Weirdness: Sheet Contents Appear Disabled

When I added a sheet to display on top of TableFlips’ document, I wondered why the text field appear disabled, tabbing through elements didn’t work, and overall functionality was limited to accepting click events: It turned out you have to make sure that you disable most of the NSWindow settings in Interface Builder except the title bar (NSTitledWindowMask). Only with a title bar (which is never visible in a sheet anyway) will the interaction work properly.

Continue reading …

Check Boxes in AppKit

Check boxes in AppKit are realized with buttons. The API reads kind of weird, so here’s a simple subclass: Now it’s easy to use checkbox.checked = true. I’d even consider check() and uncheck() methods if I used this in many places to reduce the noise and clarify what’s going on.

Continue reading …