[comp.sys.next] new question: multiple selection in a Matrix

mrc@Tomobiki-Cho.CAC.Washington.EDU (Mark Crispin) (04/06/89)

     Thanks to those people who pointed me at the runModalFor: method
in the Application class.  If you want to make a miscellaneous panel
run modally, you just need to do:
	[NXApp runModalFor:myPanel];
to invoke it and when your panel wants to return control back it
should do:
	[NXApp stopModal];
You do not need to do:
	[myPanel orderFront:self];
since runModalFor: will do that for you.  I remembered there was a
runModal method, but I forgot what class it was in...  I was tracing
up classes from Panel and basically barking up the wrong tree.

     Here's a new problem, possibly tougher.  I have an NX_LISTMODE
matrix in which I would like to select cells.  Unfortunately, it seems
that selectCellAt:: deselects the previous selected cell.  What I
would like to do is have the same effect as dragging the mouse across
multiple cells, shift-mouse, and command-mouse.  More specifically, I
would like to add a cell to the current selection when I select
programmatically; I'll clearSelectedCell when I want to zap the old
selection.

     Part of the problem is that I really don't understand what
selecting multiple cells does internally.  There is only a single
selected row/column in the Matrix.  sendAction:to:forAllCells: implies
that all it is is highlighting, but I discovered that "selecting" via
highlightCellAt::lit: does *not* cause the correct behavior.  If I try
to select a single cell via the mouse it does not unhighlight the
other cells, in fact, its behavior becomes totally wierd.

     Any ideas?

Mark Crispin / P.O. Box 2652 / Seattle, WA 98111-2652 / (206) 842-2385
mrc@Tomobiki-Cho.CAC.Washington.EDU / MRC@WSMR-SIMTEL20.Army.Mil
450cc Rebel pilot -- a step up from 250cc's!!!
kisha no kisha ga kisha de kisha-shita...tabesaserarenakerebanaranakattarashii