views:

36

answers:

1

I have an NSTableView with several columns, one of which is set up to use an NSSecureTextFieldCell as its dataCell. I am using a properly configured NSArrayController to provide data to this table.

The problem is that my secure text field does not want to work. It shows an appropriate number of dots for the strings that it holds, but it is not editable! I am unable to make changes to the secure text.

Just to be sure, I did the same thing with a regular NSTextFieldCell, and everything works like a charm. I have the bindings set up properly, and the column is set to be editable.

I was able to find a reference to the same problem on Apple's developer mailing list, but the workaround posted there is from 2006.

Is there a fix for this particular problem?
or
Does anyone have a better workaround, perhaps something that still allows the use of bindings?

+1  A: 

Works for me, at least on Snow Leopard. I haven't tried it on Leopard yet. Feel free to have a look and see if you can make it work (or confirm that it doesn't work for you).

(BTW, despite my unfortunate choice of name, it is the column that I bound, not the cell.)

Peter Hosey
That works beautifully. It turns out that I had the column set to be editable, but not the cell itself! Thanks for posting a complete, working example, and kudos on your choice of usernames and passwords :)
e.James