#include <Foundation/NSAutoreleasePool.h>
#include <Foundation/NSArray.h>
#include <Foundation/NSString.h>
#include <AppKit/NSApplication.h>
#include <AppKit/NSMatrix.h>


int main (int argc, const char *argv[])
{
  NSMatrix *m;
  CREATE_AUTORELEASE_POOL(pool);
  
  [NSApplication sharedApplication];
  m = [[NSMatrix alloc]
	  initWithFrame: NSMakeRect(0, 0, 50, 100)
	  mode: NSRadioModeMatrix
	  cellClass: [NSCell class]
	  numberOfRows: 3
	  numberOfColumns: 2];
  printf("number of rows %d\n", [m numberOfRows]);
  [m addRow];
  printf("number of rows %d\n", [m numberOfRows]);
  [m addRow];
  printf("number of rows %d\n", [m numberOfRows]);
  [m removeRow: 3];
  printf("number of rows %d\n", [m numberOfRows]);

  printf("number of columns %d\n", [m numberOfColumns]);
  [m addColumn];
  printf("number of columns %d\n", [m numberOfColumns]);
  [m addColumn];
  printf("number of columns %d\n", [m numberOfColumns]);
  [m removeColumn: 3];
  printf("number of columns %d\n", [m numberOfColumns]);
  RELEASE(m);
  RELEASE(pool);
  return 0;
}
