Read Mef

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

SourceView ========== "SourceView" is a Cocoa sample application that demonstrates how to use NSOutlin eView driven by NSTreeController and

various other Cocoa classes to produce a Fi nder-like source view. Among the features demonstrated are - Source outline view using NSOutlineView using a custom outline cell ImageAndTe xtCell, - Loading dictionary data from disk using [NSDictionary dictionaryWithContentsOf File ] to populate the outline view, - Outline view uses selection highlight style: NSTableViewSelectionHighlightStyl eSourceList, which gives is a gradient-style selection. - Icon view of directories using NSCollectionView, - Viewing URLs using WebView, - Outline view drag and drop support for URLs and file system-based objects (fro m Safari, Finder, etc), - Factoring or organizing its various NSViews into a separate nib using NSViewCo ntroller, - Factoring or organizing its various Windows into a separate nib using NSWindow Controller, - Obtaining file system icons using NSWorkspace, - NSplitView sub-pane size management during divider resize, - Using template images in our buttons such as NSImageNameAddTemplate and NSImag eNameRemoveTemplate, - NSWindow edge alteration using [NSWindow setContentBorderThickness] Note: This sample has been upgraded to support "sandboxing". Some of the changes worth noting are: 1) All access to specific file system-based locations outside of the app's s andbox have been removed. 2) for the WebView to allow targeting URLs, the entitlement "com.apple.secur ity.network.client" is turned on (or "Allow Outgoing Connections") =========================================================================== BUILD REQUIREMENTS: OS X 10.8 or later =========================================================================== RUNTIME REQUIREMENTS: OS X 10.6.x or later =========================================================================== USING THE SAMPLE: Simply build and run the sample using Xcode, launch SourceView and examine the c ontents in the outline view. The first section "Devices" is automatically added with the help of: [[NSWorkspa ce sharedWorkspace] mountedLocalVolumePaths]. The second section "Places" is als o automatically added by the window controller. The sections following are determined by the external Outline.dict file, read in as a NSDictionary and populated into the NSOutlineView. You can experiment on your own with adding and removing items in this file.

=========================================================================== CHANGES FROM PREVIOUS VERSIONS: 1.0 - First Release 1.1 - Upgraded to support 10.6, now builds 3-way Universal (ppc, i386, x86_64), fixed a bug when removing a folder failed to update the detail view. 1.2 - Upgraded for Xcode 4.3/Lion, removed all compiler warnings, plugged up som e memory leaks, leveraging improvements to Obj-C runtime. 1.3 - Fixed bug in setting the webView's URL. 1.4 - Replaced deprecated "compositeToPoint" API, updated to adopt current best practices for Objective-C, now supports sandboxing. =========================================================================== Copyright (C) 2007-2013 Apple Inc. All rights reserved.

You might also like