tags:

views:

42

answers:

1

This is a newbie question!

How to Create And Display a Custom Sheet in Cocoa? (like "Add Bookmark" sheet in Safari - see below)

  • What are the steps involved in the task?
  • How to accomplish each step?
  • Can you point out a good step-by-step article?

alt text

+1  A: 

All you need to do is make a nib file containing an NSWindow that you want to use as the sheet, and load it up. Check out Using Custom Sheets in the docs.

NSApplication has a method to let you load the sheet up:

beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:

This page has some more information and what I'd consider an easier way to set up the sheet - making it a panel or window inside the same nib file as your document window.

Carl Norum