home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!news.cs.indiana.edu!jashley@garbo.cs.indiana.edu
- From: "John Michael Ashley" <jashley@garbo.cs.indiana.edu>
- Subject: trouble with textfieldcells in a matrix
- Message-ID: <1993Jan2.111522.3847@news.cs.indiana.edu>
- Reply-To: jashley@cs.indiana.edu
- Organization: Computer Science, Indiana University
- Date: Sat, 2 Jan 1993 11:15:18 -0500
- Lines: 34
-
- Hi. I've got a problem selecting cells in a matrix. The matrix contains
- TextFieldCells, built from a prototype that looks like this:
-
- cell = [[TextFieldCell allocFromZone:[self zone]] initTextCell: NULL];
- [cell setEditable:NO];
- [cell setBordered:YES];
- [cell setAlignment:NX_LEFT];
-
- The matrix is set up as follows:
-
- [matrix setPrototype:cell];
- [matrix setMode:NX_RADIOMODE];
- [matrix setTarget:self];
- [matrix setAction:@selector(cellSelected:)];
-
- There's a little more to setting up the matrix than that, but I
- believe this is what is relevant to the problem.
-
- Now, when the application is running, I can hold the mouse button
- down, and cells will highlight and unhighlight as I pass through them,
- but I cannot select them except in the following way: if I drag the
- mouse outside of the bounds of the matrix and then let the mouse
- button up, the last cell selected before leaving the bounds of the
- matrix gets selected. Strange!
-
- [By "selected", I mean the cellSelected: message gets sent.]
-
- I've gotten this to work using a prototype that was an instance of a
- ButtonCell, but I need to use a TextFieldCell.
-
- I'm stuck, and would appreciate any help you can offer.
-
- Thanks, and happy new year.
- Mike
-