I have recently used the
Array.forEach{ $0.isHidden = false }
function with NSTextFields for macOS in Xcode 8 using Swift 3. I am trying to do the same thing with NSBoxes. Here is what I am doing:
let Boxes: [NSBox] = [notesBox, manualEditBox, addSubmasterAutoBox, submasterFileDetailsBox]
Boxes.forEach{$0.isTransparent = false}
At the second line, it is giving me an error saying "Cannot use instance member 'notesBox' within property initializer, property initializers run before 'self' is available." I can guarantee that all of these NSBoxes are linked properly and properly referenced using @IBAction.