[comp.sys.next] another problem.

tsui@silver.bacs.indiana.edu (Yufeng Tsui) (08/04/89)

Here is another problem I encountered.
I creatd a cell(myCell) of class ButtonCell and:
[MyCell setType:NX_SWITCH];

I then used this prototype to creat a matrix(with mode NX_LISTMODE).
The problem is the cell in the matrix won't redraw itself when clicked!
However, if I change the matrix mode to NX_RADIO, it works fine.
So if I use NX_LISTMODE, I have to setup something in the target of
the matrix and seticon to switch or switchH manually to show the status.
What a pain!!  Now is the NX_LISTMODE designed to be like this? Or there
are some tricks I am missing?   Any comment?! 

--yufeng
tsui@silver.bacs.indiana.edu

jpd00964@uxa.cso.uiuc.edu (08/04/89)

> Here is another problem I encountered.
> I creatd a cell(myCell) of class ButtonCell and:
> [MyCell setType:NX_SWITCH];
> 
> I then used this prototype to creat a matrix(with mode NX_LISTMODE).
> The problem is the cell in the matrix won't redraw itself when clicked!
> However, if I change the matrix mode to NX_RADIO, it works fine.

The big internal difference between list and radio modes are that radio allows
the cell to track the mouse while list does not.  

a ButtonCell set to NX_SWITCH, from your description, appearently needs to
track the mouse to switch its state and redraw.  Is it flipping its state
and not redrawing?  Or is it neither flipping its state nor redrawing.  If it
actually switching the state, which I doubt, then a [myMatrix display]; should
fix your problem.

You may be able to fix your problem by fiddling with the changeXXX and 
lightsByXXX fields of your buttonCell.

Michael Rutman
Softmed