I try to create an outlet from a NSTextView
, which is a subview of my NSView
derived custom class called GeneralView
. I want to connect this outlet to my GeneralView
class but Xcode
doesn't like it. I get the following screen:
In this image, I want to connect an @IBOutlet
from the NSTextField
that contains '0000' to 'tfLiid' in GeneralView.
It only works if I create a @IBOutlet
to the ViewController
.
But I have like more than 50 views (textfields, progress bars, checkboxes and so on...) I need to update, so I want to split those views in 3 parent views and keep the ViewController clean by holding only the 3 parent (or group) views.
The image below makes you understand more of what I tried to achieve (I hope).
I just don't know how to get this done right in Xcode, it's not a programming problem. Thank you.
I found a solution, just by experimenting trying out. I just couldn't let it go. Anyway, you have to drag from the little @IBOutlet circle (on the line number) to the view you want to connect it to. I don't know why the other way around doesn't work, there must be a reason for it.