NSCollectionView coding headstart extra steps

  • 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
    <atomicbird...>
    AIM: atomicbird1
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today