ViewHierarchy

ViewHierarchy - Runtime inspector that allows you to examine the hierarchy of NSView objects in the windows of your application
Download

ViewHierarchy Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Cameron Hayne
  • Publisher web site:
  • http://hayne.net/MacDev/Perl/zero_separated
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 35 KB

ViewHierarchy Tags


ViewHierarchy Description

ViewHierarchy - Runtime inspector that allows you to examine the hierarchy of NSView objects in the windows of your application ViewHierarchy provides a runtime inspector that allows you to examine the hierarchy of NSView objects in the windows of your application. It is intended as a debugging tool, or just as an aid to understanding.To use it in your own project, you need only add the following files to your project:· HTViewHierarchyCtl.h· HTViewHierarchyCtl.m· HTViewHierarchy.nib and then add the following line in an appropriate place (e.g. applicationDidFinishLaunching): ;The "View Hierarchy" window will then show up automatically. You will be able to choose any of the windows in your application from the popup menu and see the hierarchy of views of that window. Clicking on one of the items in the "View Hierarchy" window will flash the corresponding NSView object so you can identify which one it is.The ViewHierarchy project provides a demo of the use of the "View Hierarchy" inspector. The MainMenu.nib file has an "Extra Window" provided solely for experimenting with the view inspector.The "MyController" class loads the HTViewHierarchy.nib file in its 'applicationDidFinishLaunching' method as described above. The MainMenu.nib and MyController files would not be used when you incorporate the view inspector in your own project. This project illustrates several aspects of programming for Mac OS X using the Cocoa API:· use of NSOutlineView data sources· use of a notification to update an NSPopupButton menu on the fly· use of tags to identify items in an NSPopupButton· drawing on an NSView outside of the 'drawRect' method· use of 'respondsToSelector' to determine the appropriate method to use for an object of unknown type


ViewHierarchy Related Software