I have an NSView (we'll call it view1) that is from an NSViewController. The Super view (which we'll call view2) is located inside an NSWindowController. The problem is, I can add view1 to view2, but I can't remove it.
+2
A:
From your comment I'd guess one of your instance variables to the view controller or the view itself isn't being set correctly, so you're calling removeFromSuperView
on nil. Use the debugger to explicitly see the state of the objects involved.
Marc Charbonneau
2010-06-19 15:40:10
the view isn't nil before I call `removeFromSuperview` but after I call remove then it is null, but the view itself isn't getting removed
Matt S.
2010-06-19 16:30:53
Matt S.: Check `view` (the superview). It probably is `nil`.
Peter Hosey
2010-06-20 01:44:37