MOViewListViewItem


MOViewListViewItem instances represent the indivdual views inside a MOViewListView.
Superclass: NSObject



MOViewListViewItem used to keep track of the individual views in a MOViewListView. MOViewListView uses them like NSTabView uses NSTabViewItems. MOViewListViewItem keeps track of the actual view, the label to use for it within the MOViewListView, and some computed state for the item.

In addition, MOViewListViewItem provides storage for several things that the client can use for any purpose. Each item has an identifier, a representedObject and a userInfo. Each of these can be any kind of object although NSStrings are traditional for identifiers and NSDictionaries are traditional for userInfo. representedObject would be ideal for storing a reference to the controller object responsible for the view owned by the item (if any).

One use for MOViewListViewItem is to preserve laziness of UI loading. By default, MOViewListViewItems are collapsed. Until an item is actually added to a MOViewListView and then expanded, there's no need for the view to be loaded and initialized. In this case, you can create a MOViewListViewItem with no view set it in and add it to the MOViewListView so that its label will appear appropriately. Then, the delegate of the MOViewListView can trigger the loading of the view when needed by implementing the -viewListView:willExpandViewListViewItem: method and making it load the view and use -setView: to set it into the item, if it has not been loaded yet.



(Last Updated 3/20/2005)
HTML documentation generated by HeaderDoc