In Cocoa, I have an NSOutlineView where the cells are NSTextFieldCell. A cell displays values, which are strings that are formatted according to specific rules (such as floats or pairs of floats with a gap between them). I created a custom NSFormatter to check the text, and it seems to be no problem.
However, the cell (or the representation of the circuit, I'm not sure what causes this) seems to only use the formatter at the time my editing is complete. If I enter some text characters in a text box (which violates the formatting rules), these characters appear - the only way to notice that the formatting operator is doing its job, so I can no longer move the keyboard focus from this cell. If I return the contents of the cell to its actual form, then I can move the focus.
I set both the cell and the circuit to be "continuous."
It would be better if I could not enter the text in the cell in the first place. Is it possible to do so, and if so, how?
harms source share