Could someone explain to me what are the main differences between NSTextField and NSTextView? I know that NSTextView has more features and is usually used for longer texts, and NSTextField is usually used for one-line plain text fields, but if I understand correctly, NSTextField can be also used with attributed strings and with multiple lines...
Technically true, but you normally use text fields for values that are plain text and usually only one line. (Handle multiple lines, as a text field can accept them. If nothing else, strip the line breaks in a way that makes sense for what you're doing with the text.)
it should display text in about 1-4 lines
it should be able to show links in the text (as I understand, this should be simple in both controls - http://developer.apple.com/mac/library/qa/qa2006/qa1487.html)
NSTextView. Supporting links in an NSTextField is tricky.
it should let the user select and copy the text
it should NOT let the user scroll the text,
NSTextField or NSTextView without NSScrollView. You can do the latter in IB by dragging a text view from the Library and then choosing Unembed Objects from the Layout menu.
or show the context menu that usually appears in editable text fields,
Yes, it should. You should always offer menu items like Copy and read-only services. Either control should do this for you; don't fight this.
it shouldn't even show a text cursor in this field
If you leave selection enabled (which you generally should), they'll show a cursor if the user clicks in the field. This is a feature, as it indicates where the selection anchor is for shift--arrow selection.
With such requirements, is it better for me to use a NSTextField or NSTextView?
Thanks for the info. Looks like everything is working fine now, I also managed to disable the text cursor using shouldDrawInsertionPoint. One thing I wasn't able to do was to convince it to always show an arrow cursor instead of the X-shaped one, but I can live with that...
@Psionides: X-shaped? You mean the I-beam? You could try sending discardCursorRects to the text view.