Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sgthree

macrumors newbie
Original poster
Feb 10, 2012
9
0
I am trying to get my head around the difference between sheets and panels and other types of windows.

Could someone please tell me what is being used by the Mac Mail application (on Lion if that makes a difference) when one chooses Add Account from the file menu?
 

Sydde

macrumors 68030
Aug 17, 2009
2,552
7,050
IOKWARDI
A sheet is a modal dialog that you attach to a window with a method call that causes it to be displayed. The idea was to make a modal dialog that did not block the user from doing things elsewhere (clicking into other windows) while it is displayed, also clarifying the dialog's target window.

Typically, you would build a sheet's layout in interface builder as a window object, then use that object as an argument to the method call that displays the sheet. File open/save sheets are a little more complicated to code yourself because they are asynchronous, but most of the time you just let NSDocument handle that for you.

Sheet Programming Guide
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.