On 25 Jun 2011, at 7:05 PM, Ari Black wrote:

> @implementation SpecialMatrix
> 
> - (id)initWithFrame:(NSRect)frameRect mode:(NSMatrixMode)aMode 
> prototype:(NSCell *)aCell numberOfRows:(NSInteger)numRows 
> numberOfColumns:(NSInteger)numColumns {
>    int x;
>    x = 0; // I put a breakpoint here
> 
>    return self;
> }
> 
> @end

You don't get to this point, so it's not the problem you have now, but I assume 
your real code invokes [super initWithFrame:...]?

> This is in the implementation of the class that controls  the window the 
> browser is in:
> 
> - (void)awakeFromNib {
>    [browser setMatrixClass:[SpecialMatrix class]];
> 
>    [browser loadColumnZero];
> 
>    NSMatrix *matrix = [storyLine matrixInColumn:0];  // <- return nil
>    matrix = [storyLine matrixInColumn:1]; // <- returns nil
> }

First step: Break in -awakeFromNib and verify that browser is not nil.

Second step: Maybe an NSBrowser doesn't instantiate any matrices until you have 
responded to browser:numberOfRowsInColumn: with a non-zero value?

        — F

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to