PopUp Compiler Error

I have 2 PopUp buttions in my app. Both have identical selections in their respective attribute inspectors. But, when compileing, I get the error, "Value of type 'NSTextField' has no member 'addItems'". Following is a copy of my code:


override func viewDidLoad() {

super.viewDidLoad()

let monthNameValues = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]

incomeMonOne.addItems(withTitles: monthNameValues)

let assetTypeValues = ["Bond", "Fund", "Stock"]

assetType.addItems(withTitles: assetTypeValues) ****** Error shows here ******

// Do any additional setup after loading the view.

}


What's going on here.

Accepted Reply

How did you declare assetType ?


If it is the IBOutlet, that's logcial error.

Replies

How did you declare assetType ?


If it is the IBOutlet, that's logcial error.

Claude, thanks for your help, again! I forgot to create an IBAction. I don't claim to be smart, just persistent. Terry