• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSBrowser matrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSBrowser matrix
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Detect shift key down
  • Next by Date: Re: Detect shift key down
  • Previous by thread: Re: Detect shift key down
  • Next by thread: Re: NSBrowser matrix
  • Index(es):
    • Date
    • Thread