Constraining NSSplitView

I have a NSSplitView with a single divider. Without using any delegate methods, the divider slides the width of the split view just fine and the views on each side resize fine; which is as much to say I think I’ve got the springs and struts set correctly.

However, when I put these in the split view’s delegate…

on splitView_constrainMinCoordinate_ofSubviewAt_(theSplitView, proposedMin, dividerIndex)
	return 100.0
end splitView_constrainMinCoordinate_ofSubviewAt_

on splitView_constrainMaxCoordinate_ofSubviewAt_(theSplitView, proposedMax, dividerIndex)
	return 250.0
end splitView_constrainMaxCoordinate_ofSubviewAt_

…the divider when moved always goes directly to 0, the far left of the split view. The left area disappears, and the right area expands to the full size of the split view. It’s as though the real doesn’t get returned, or that it is being interpreted as 0. After hitting the left wall, the divider cannot be moved subsequently.

I gotta be missing something, right?

In the BWToolkit you can find the BWSplitView, which is a NSSplitView subclass, and these options can be set directly in the IB inspector.

Right. I’m familiar with BWToolkit and may ultimately have to go with it.

But that still leaves me wondering why I’m having issues with split view delegate methods.

I quote myself: “If you don’t need it, don’t mind it” :smiley: