1

I've been developing a macOS app using a storyboard that defines a main window with toolbar and splitview. It's written in Swift 3 -- I have not migrated to Swift 4 yet. The splitview has a pane for graphics and another for a text log; both scroll. I have view controllers for all three; the two subsidiary scenes are tied to the split view with relationships. This worked up until today when I installed Xcode 9 beta 4. (Yes, I have beta 3 in the trash at the moment and can revert)

Upon cleaning the build folder and compiling, I get the error

NSSplitViewController's 'view' outlet should not point to its NSSplitView; use the 'splitView' outlet instead 

However, the NSSplitViewController subclass has no outlets defined (its two children arrange to tell it of their existence in their viewDidLoad methods). Moreover, I don't seem to be able to create an outlet between that window and its controller that would have created the error in the first place.

I now also note that the split drawn in the split view controller's scene is horizontal instead of vertical as it had been. I don't see a way to change that. (I can't run the app, so I don't know if it matters. I suspect it does.)

The net result is that I can't see what the error is trying to tell me. The error prevents the application from building and running, whereas with beta 3 it worked. I'm hoping someone can explain what Xcode is telling me and how to fix it.

Feldur
  • 1,121
  • 9
  • 23
  • Did you resolve this issue? Just happened to me after upgrade of Xcode. – Dean Davids Sep 24 '17 at 12:05
  • I did resolve it, but did so by rebuilding the storyboard from scratch. Mine is pretty simple, so that was far less cost than what was turning into days trying to find what the problem was (in my case, the outlets window didn't seem to show view and splitView both assigned as you describe). That's not much of an answer, and so why I didn't post it here. – Feldur Sep 29 '17 at 16:32

1 Answers1

0

I did fix this in my own Storyboard. In the outlets window, I saw that the view outlet was indeed assigned to the NSSplitView. I deleted it. It was also assigned to the splitView outlet, so the change did not seem to effect anything. The warning went away and my project then did build.

I have no idea if this was always that way and compiler update changed or if this was somehow inadvertently set differently in some way. It makes sense in any case, the NSSplitview should be assigned as the splitView outlet, not the view outlet.

Dean Davids
  • 4,174
  • 2
  • 30
  • 44