Hi,
I have a NSMatrix (1 column, n rows) of custom cells embedded in a
NSScrollView which displays a vertical scroller. The scroller reflects
NSMatrix height / displayed area relationship, but dragging / clicking
only moves the thumb and doesn't scroll the NSMatrix. The first few
elements (those that fit in [NSScrollView -documentVisibleRect]) get
drawn (and re-drawn when the scroller's thumb reaches the top), the
others don't; the NSRect passed to the cells is always the same.
I've looked at scrollview2.m in the Testing directory, and I can't see
what I'm doing wrong. I suspect my cell class to be broken somehow, but
again, I don't know what I'm doing wrong.
Right now, my cell class overrides the -init and -drawWithFrame:inView:
methods, but I've also tried supplying -controlView, -cellSize and
-drawingRectForBounds:. Is there anything else that I need?
I'm using
mailListView = [[NSScrollView alloc] initWithFrame: scrollView1Rect];
[mailListView setHasVerticalScroller: YES];
mailListMatrix = [[NSMatrix alloc] initWithFrame: mailListRect
mode: NSTrackModeMatrix
cellClass: [MailListCell class]
numberOfRows: [currentMBox count]
numberOfColumns: 1];
[mailListView setDocumentView: mailListMatrix]
to build the view.
Help?!
Thanks,
--Bj�rn
PS I will probably continue bombing the list with stupid questions about
GNUstep programming for a while since all I have is the OpenStep
reference, which really isn't too clear in some spots; hope you don't
mind.