ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/Jan-Apr/Matrix-NX_LISTMODE

This is Matrix-NX_LISTMODE in view mode; [Up]


Date: Sun 17-Apr-1989 22:27:12 From: Unknown Subject: Matrix NX_LISTMODE In article <1586@blake.acs.washington.edu> Mark Crispin writes: > Now, to put some signal into this noisy message: I am *still* >trying to figure out how in an NX_LISTMODE matrix how to >programmatically get the effect of COMMAND/LEFT-MOUSE on a matrix item >(that is, *add* it to the selected items instead of making it the only >selected item). Merely calling highlightCellAt::lit: visually does >the right thing, but leads to bizarre effects when you try selection >modification via the mouse. You will need to set the state of the cell you want to select to 1 before you call highlightCellAt::lit:. Here's a code fragment that will do the trick: (You can add this to a subclass of Matrix or, with the appropriate changes, use it in other ways...) - addToSelection:(int)row :(int)col { // selectCellAt:: deselects all others; so we need // to select in addition, using: [[self cellAt:row:col] setState:1]; [self lockFocus]; [self highlightCellAt:row:col lit:YES]; [self unlockFocus]; return self; } Ali Ozer, NeXT Developer Support aozer@NeXT.com >From: ali@polya.Stanford.EDU (Ali T. Ozer)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.