That's not what I suggested.
You should use:
let titleOfOtherItem = incomeMonOne.itemTitle(at: newIndex) // Sorry, here I forgot incomeMonOne.
and not
let titleOfOtherItem = incomeMonOneTitle(at: newIndex)
So the code becomes:
let newIndex = incomeMonOne.indexOfSelectedItem + 6
let titleOfOtherItem = incomeMonOne.itemTitle(at: newIndex)
incomeMonTwo.stringValue = titleOfOtherItem // If it is OSX App ; if IOS, that would be .text
I see another error in your code:
if incomeMonOne.indexOfSelectedItem > 6 {
if dialogOK_Cancel(warning: "Income Month One", reason: "month must be < Jul") {
dialogForceCancel(reason: "User Cancelled")
exit(0)
}
let newIndex = incomeMonOne.indexOfSelectedItem + 6
let titleOfOtherItem = incomeMonOneTitle(at: newIndex) // ERROR HERE: Use of unresolved identifier 'incomeMonOneTitle'
incomeMonTwo.stringValue = titleOfOtherItem
}
}
Seem it misses a closing bracket between lines 5 and 6; otherwise, when
incomeMonOne.indexOfSelectedItem <= 6
you skip directly at line 11.