Hiding cell of a matrix.

Hi,

I wanted to hide a cell of a matrix so I tried:

set visible of cell 3 of matrix 1 of window 1

But that didn’t go nice so I went from “visible” to “transparent”

set transparent of cell 3 of matrix 1 of window 1

Which does seem to work but there are some problems, it won’t work all the time, if you only call that line (so no code before and/or after that line) then it won’t work unless you go to another window or so. When you add other lines to your code like below it does seem to work.

set visible of matrix 1 of window 1 to false
set transparent of cell 3 of matrix 1 of window 1 to true
set visible of matrix 1 of window 1 to true

It’s the same in Objective-C, hiding NSMatrix, set transparent of NSCell to false showing NSMatrix…

Am I using the wrong syntax here? Does it have something to do with NSCells not being NSViews?
Somewhere someone suggested

Can someone shed any light on this please?

Thanks.

I know it’s not really what you’ve asked for, but instead of making the cell not visible, you could disable it. Off course you keep seeing the object after setting enabled to false, but you can’t click it.

set enabled of cell 1 of matrix 1 of window 1 to false

Nah, but thanks for the input! :smiley:

If nothing comes up I’ll use the hide matrix, hide cell, show matrix thing. But I posted this question to see if there were alternatives.