I have an NSTextView, which I want to use as the field editor of an NSTextField.
Since there will be other NSTextFields in the view that do not use a custom field editor, it seems I should use NSCell's method
- (NSTextView *)fieldEditorForView:(NSView *)aControlView
I can't wrap my brain around how to call this, though and have not found any examples of it in use.
NSCell's docs say that 'aControlView' is :
The view containing cells that require a custom field editor.
Which my brain is saying means 'the view this NSTextField is in', and not the NSTextField (as a subclass of NSView).
NSView *viewTheTextFieldIsIn;
CustomTextView *customTextView subclass of NSTextView (the field editor)
NSTextField *textField
However:
[[textField cell] fieldEditorForView:customTextView];
makes no sense to me because its not viewForFieldEditor:
...but its on NSCell.
Would someone have mercy on me, and un-snarl my thinking?