I've subclassed and defined my own custom NSFormatter and NSTextField classes in order properly display SMPTE time code values (HH:MM:SS:FF
). When the user selects to use drop-frame for the fps value, the format changes to HH:MM:SS;FF
(semi-colon at the end). I have this all working well except for one final hurdle.
When changing the format, the NSTextField with the focus does not update it's display until it's focus is lost. Here is a screenshot to illustrate:
I have tried sending the NSTextField a setNeedsDisplay
message when the format is changed, as well as sending it a display
message. Nothing seems to work so far, and the text field with focus refuses to update/redraw itself until it loses focus.
Any suggestions of what I need to do to make this happen?
NSTextFieldCell
object but from there I can't seem to access the field editor. Sending thefieldEditorForView:
orfieldEditor:forObject:
gives me a "does not respond to selector" error. Furthermore, I've tried thedrawWithFrame:inView:
for the NSTextFieldCell, and no dice.setNeedsDisplayInRect:avoidAdditionalLayout:
looks promising, but I can't get to the NSTextView instance of my text box. – Chris