How do I set the enabled nsmatrix cell

Ok, I figured out how to get the title of the selected field, but I can’t figure out how to set which nsmatrix cell is “selected” on the fly.

I figured something like this:

set enabled of cell "cellname" of matrix "matrixName" of drawer "drawerName" of window "main" to true

But that was no go, so I tried:

set current cell of matrix “matrixName” of drawer “drawerName” of window “main” to “cellName”

Nope.

So I’m stuck.

Btw, is there any documentation on this? I’ve searched the apple docs and can’t find anything.

Hi krunk,

to set enabled this one looks correct:

	set enabled of cell "cellname" of matrix "matrixName" of drawer "drawerName" of window "main" to true -- or false

but from what you were writing … (just a wild guess) might it be that you didn’t want to enable or disable a cell (turns grey and can’t be clicked when disabled) but setting it’s content (state of button cell) instead?

you can set it like so for example:

	set content of cell "cellname" of matrix "matrixName" of drawer "drawerName" of window "main" to true -- or false

Hope that helps …

D.