Cocoa drag to dock to open

Go to Project->Edit Active Target->Properties (Tab) and enter the filetypes that you want your dock icon to respond to : ...

April 13, 2007 · 1 min · Dave Perrett

Quit cocoa app on window close

Add this method to your NSWindowController : -(BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication { return YES; }

April 13, 2007 · 1 min · Dave Perrett

Cocoa NSTextView setHidden

If you’re trying to hide an NSTextView without success, be aware that setHidden only hides the NSTextView itself - it doesn’t hide the enclosing NSScrollView. Instead of doing this : [myTextView setHidden:YES]; you need to do : [[myTextView enclosingScrollView] setHidden:YES];

April 5, 2007 · 1 min · Dave Perrett