Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Recipe 7. Refine the Document’s Usabilit... > Step 5: Autosave the Position of the...

Step 5: Autosave the Position of the Divider in the Diary Window

Leopard brought a long-requested new feature to NSSplitView, the ability to autosave the position of the divider. The Apple Human Interface Guidelines haven’t caught up. They provide no guidance on what to do with the split view in a new, empty window. Fill this gap by applying the same rule that you applied to the frame of a new, empty document’s window frame: A divider’s position should not be autosaved and restored when creating a new diary document, but only when opening a saved diary document.

Before writing any code, experiment with the application while relying solely on Interface Builder to set the autosave name. Open the DiaryWindow nib file and select the split view divider. In the Split View inspector, enter diary split view in the Autosave field. Save the nib file, trash any saved diary document icons left over from Step 4, and then build and run the application. Choose File > New Chef’s Diary and, in the empty diary window, drag the divider partway up. Close the document and create another new Chef’s diary document. The divider is right where you left it. This is inappropriate, since a new document window should have a standard appearance every time the user creates one. Plainly, as with the window frame autosave feature, you should use Interface Builder to implement the split view divider autosave feature only in simple applications where a main application window contains a split view.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint