Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!texbell!wuarchive!brutus.cs.uiuc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!ziploc!eps From: eps@toaster.SFSU.EDU (Eric P. Scott) Newsgroups: comp.sys.next Subject: Re: SelectionCell inside a Matrix Summary: you have two problems Message-ID: <256@toaster.SFSU.EDU> Date: 19 Jan 90 05:38:37 GMT References: <1990Jan18.220642.1067@csusac.csus.edu> Reply-To: eps@cs.SFSU.EDU (Eric P. Scott) Distribution: usa Organization: San Francisco State University Lines: 30 In article <1990Jan18.220642.1067@csusac.csus.edu> bobgro@csuchico.edu (Bob Groendyke) writes: >I've created a matrix of selectionCells, and set the matrix as >a docView of a scrollView. The problem I'm having is not being able >to set the title of the selectionCells. Here's some code: >protoCell = [SelectionCell newTextCell:"proto"]; >myMatrix = [Matrix newFrame:&aSVRect mode:NX_LISTMODE I think you wanted prototype:protoCell here > numRows:50 numCols:1]; > >[myMatrix setTitle:"first" at:1 :1]; >[myMatrix drawCellAt:1 :1]; /* shouldn't need */ >Putting in a [myMatrix display] before or after the setDocView doesn't >seem to have an affect. The scrollVeiw was created in IB. From what I can >get out of the documentation, it seems the first cell here should have the >word "first" in it, but no. Any suggestions as to what's missing? 1) This isn't FORTRAN. The first cell is 0:0, not 1:1. 2) SelectionCells don't have titles, they have stringValues. say [[myMatrix cellAt:0:0] setStringValue:"first"]; (or setStringValueNoCopy:"first") Note that Matrix doesn't implement setStringValue:at:, only Form does, and Forms can only have one column, so there's no setStringValue:at::, hence the use of cellAt::. -=EPS=-