Hello all,
  I'm trying to set the matrix class for an NSBrowser I have in a window.

I have the following in my .h file:
@interface SpecialMatrix : NSMatrix {

}

//- (id)initWithFrame:(NSRect)frameRect mode:(NSMatrixMode)aMode prototype:(NSCell *)aCell numberOfRows:(NSInteger)numRows numberOfColumns:(NSInteger)numColumns;

@end


And this is in the .m:

@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

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
}

From the documentation, initWithFrame:mode:prototype:numberOfRos:numberOfColumns is the designated method but it's never called even when I called loadColumnZero. Both calls to matrixInColumn: return nil. Can someone tell me what I'm doing wrong?

  Thanks!
_______________________________________________

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