NSBrowser matrix
NSBrowser matrix
- Subject: NSBrowser matrix
- From: Ari Black <email@hidden>
- Date: Sat, 25 Jun 2011 20:05:52 -0400
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 (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