Hi,

Thanks for the improvements and fixes to MiscMatrix.  I am forwarding your mail to the misckit list, so someone who is actively involved can incorporate your fixes into the next release.

____________________________________________________________
Mike Ferris	I often think it's a pity
mike@lorax.com	that Noah and his party didn't
(510) 652-2039	miss the boat.
		-Mark Twain

Begin forwarded message:

Date: Fri, 8 Jul 94 18:52:31 +1000
From: Darrin Smart <darrin@research.canon.oz.au>
To: mike@lorax.com
Subject: MiscMatrix bugs and enhancements
Cc: darrin@research.canon.oz.au

Mike,

I've being playing with MiscMatrix and discovered a couple of problems. My new version of the class is in:

  MiscMatrix.h	  MiscMatrix.m
MiscMatrix.h	MiscMatrix.m

(Sorry, you'll have to use FileMerge to see the changes themselves).

Below is a short description of what I have done:

[MiscMatrix addRow] and [MiscMatrix addCol] did not work. This was because [Matrix addRow] calls insertRowAt:, and so the sizes get updated twice. The fix was simply to remove addRow and addCol.

getRow:andCol:forPoint: did not return nil if the point was not in a cell. Fixed.

Added sizeRowsToCells method to make rows fit snuggly to biggest cell in each row. You could write a similar thing for columns I suppose.

Added sizeTo: method so that when the matrix was resized it would distribute the change in space amongst it's cells, if autoResizeCells was enabled).

There may have been more; I can't remember! Hope you can use this code in future MiscKit releases.

With a little work I have got it to work as a subclass of NiftyMatrix (from the ScrollDoodScroll example).

 - Darrin