View Full Version : Create an "Open on Startup" window.

Sep 19, 2008, 02:05 PM
Hi there.

I want to create a window, with a checkbox in the bottom left. If the checkbox is unchecked, the window will display each time the application is launched, if it is checked, the window stops displaying on launch.

I am relatively new to Mac application development, and couldn't find a tutorial anywhere, so a tutorial, or some sample code would really help.

~ Christian

Sep 20, 2008, 01:54 AM
It's pretty simple. When the application launches, you check to see if the preferences contains a FirstRun object. If it doesn't, then you show the window. When the window closes and the checkbox is marked, you save a FirstRun object to preferences (usually a boolean set to true).

Since you didn't give what API you're using I can only provide you the concept of how to implement it but that should be plenty enough.

Sep 20, 2008, 04:45 AM
I really am a noob when it comes to this, I know the bare basics but thats about it.

I am using Cocoa/Obj-C CoreData. If thats any help?

Sep 21, 2008, 11:25 AM
You need then to familiarize yourself with NSUserDefaults, NSWindow, and bindings (specifically NSUserDefaultsController).