home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / next / programm / 7962 < prev    next >
Encoding:
Text File  |  1993-01-02  |  1.6 KB  |  45 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!news.cs.indiana.edu!jashley@garbo.cs.indiana.edu
  3. From: "John Michael Ashley" <jashley@garbo.cs.indiana.edu>
  4. Subject: trouble with textfieldcells in a matrix
  5. Message-ID: <1993Jan2.111522.3847@news.cs.indiana.edu>
  6. Reply-To: jashley@cs.indiana.edu
  7. Organization: Computer Science, Indiana University
  8. Date: Sat, 2 Jan 1993 11:15:18 -0500
  9. Lines: 34
  10.  
  11. Hi.  I've got a problem selecting cells in a matrix.  The matrix contains
  12. TextFieldCells, built from a prototype that looks like this:
  13.  
  14.   cell = [[TextFieldCell allocFromZone:[self zone]] initTextCell: NULL];
  15.   [cell setEditable:NO];
  16.   [cell setBordered:YES];
  17.   [cell setAlignment:NX_LEFT];
  18.  
  19. The matrix is set up as follows:
  20.  
  21.   [matrix setPrototype:cell];
  22.   [matrix setMode:NX_RADIOMODE];
  23.   [matrix setTarget:self];
  24.   [matrix setAction:@selector(cellSelected:)];
  25.  
  26. There's a little more to setting up the matrix than that, but I
  27. believe this is what is relevant to the problem.
  28.  
  29. Now, when the application is running, I can hold the mouse button
  30. down, and cells will highlight and unhighlight as I pass through them,
  31. but I cannot select them except in the following way: if I drag the
  32. mouse outside of the bounds of the matrix and then let the mouse
  33. button up, the last cell selected before leaving the bounds of the
  34. matrix gets selected.  Strange!
  35.  
  36. [By "selected", I mean the cellSelected: message gets sent.]
  37.  
  38. I've gotten this to work using a prototype that was an instance of a
  39. ButtonCell, but I need to use a TextFieldCell.
  40.  
  41. I'm stuck, and would appreciate any help you can offer.
  42.  
  43. Thanks, and happy new year.
  44. Mike
  45.