Legacy Mac OS X Reference Library Apple Developer Connection

Version: 1.5

Posted: 2007-05-29

Build Requirements: Xcode 3.0 (or the latest)

Runtime Requirements: Mac OS X 10.5

View Source Code:

Download Sample Code (“HIView-NSView.zip”, 117.0K)



Description

Demonstrates how to embed an NSView within an HIView in a Carbon window. This Carbon sample includes both a Carbon and a Cocoa nib file. The Cocoa nib, WebView.nib, contains a view hierarchy embedded in a top level NSView. After a new Carbon window is created, an NSViewController is used to load the Cocoa nib and get a reference to the top level view. The NSView hierarchy is then embedded in an HICocoaView. All the connections made in Interface Builder are preserved. NSViews can be created manually or with Interface Builder.

Document Revision History

Date Notes
2007-05-29Upgraded to use NSViewController.
Did this document help you? Yes It's good, but... Not helpful...