Build a Custom Sheet in Cocoa

blog — Tags: , , , , , — anon @ 10/03 7:51 pm

What is a sheet? Well, Cocoa introduced several new GUI elements like drawers that aren’t used by too many applications right now. They are used nicely, however, in Mail to house your mailboxes and in OmniWeb to store your bookmarks.

One of the elements that are available to Mac developers are called “sheets”. In particular, sheets are those things that slide out of the title bar of a window. In fact, a sheet is just a NSPanel that is being attached to the application window at runtime. You can see a sheet in action when actually opening or saving a file.

What is the difference between a sheet that slides out and a modal window that pops up? Well, there are some serious considerations. You may also want to check out this tutorial by Erik. J. Barzeski on CocoaDevCentral which I used as a informational and textual base for this post. There you can find a little bit more about modal windows which I don’t want to explain right here in depth.

In short, sheets are a very stylish way to let the user know that a certain action needs to be done or that there is something wrong and that need to be fixed.

(more…)

copyright © 2008-2010 datenkompost.de/blog - barecity derivative | imprint
* a title remix inspired by a popular german book