appkit

Borderless NSButton turns gray when clicked.

I am making a little application with three NSButtons with an image set. These buttons have no border nor background. However, when I click a button it turns into a gray rectangle. How can I fix this? Thanks. ...

Disable Full Keyboard Access for App

Can "Full Keyboard Access" (System Prefs -> Keyboard -> (Radio) All Controls) be controlled with some API? It causes major issues when this thing is on in my app (like buttons not working as expected etc ... it has some custom UI) Regards, Erik ...

Writing classes that work in both iOS and Mac OS.

What is a good way to write classes that can be used in both iOS and Mac OS applications? I'm not trying to get a full cross-platform UI solution here, just a way to use several model classes from my iPhone app in a support application running on the Mac. Some of those classes require a few minor changes to get them compiling under Mac O...

Cocoa (Snow Leopard) NSTextView's textStorage -setAttributes:range: removes characters!

I'm not sure what I'm doing wrong. I have a NSTextView and am registered as the delegate for its textStorage attribute. When I receive -textStorageDidProcessEditing:notification: I'm trying to apply attributes to ranges of characters within the text. It certainly does "something" to the characters, but not what I expect... they just d...

Autorelease pools in appkit applications

I'm having difficulties to understand exactly WHEN autorelease pools are created and released in AppKit apps. For example, if I have an ApplicationController class that overrides init, is there an autorelease pool that gets created before it starts and gets drained after it ends? ...