NSCollectionView coding headstart extra steps
NSCollectionView coding headstart extra steps
- Subject: NSCollectionView coding headstart extra steps
- From: "Tom Harrington" <email@hidden>
- Date: Wed, 2 Jan 2008 11:59:02 -0700
The coding headstart "Beyond Tables and Cells: Introducing Animated
Collection Views" is missing some important steps necessary to make
the project's application work as described. I've filed a
documentation bug but I thought I'd post the extra steps here in case
anyone has trouble with it.
In step 8, MyDocument.nib is never edited. Since it is unchanged from
the project template, the application does not display the icons as
described (instead it just shows "Your document contents here"). The
following additional steps are necessary:
1. Open MyDocument.nib.
2. Delete text reading "Your document contents here".
3. Drag a custom view object into the document window.
4. Resize the custom view to fill the document view. In the "size"
tab of the inspector window, set the custom view to track the window's
size.
5. Set the "myTargetView" outlet of File's Owner to be the custom view.
In step 9, an interface for IconViewBox is added to the project, but
no implementation for this class is added. As a result clicking on
icons fails to work as expected. You need to add this to
MyViewController.m:
@implementation IconViewBox
- (NSView *)hitTest:(NSPoint)aPoint
{
return nil;
}
@end
In step 10, selection change detection fails to work because
MyViewController's arrayController outlet has not been connected in
Connection.nib. This fixes it:
1. Open Collection.nib
2. Connect File's Owner's "arrayController" outlet to the NSArrayController.
--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden