The Preferences screen is one which I have modified from another project in which it shows with the expected control order. I have extracted the part of the MainMenu.xib file in which the Preferences window is defined for the modified and original files. Edited versions of both are included below (full versions exceed the size limit for posts, as they comprise about 200 lines each). Modifications include additions of several controls, movement of existing controls and change of window size. Comparison between the modified and the original Preferences window code show many differences, but a significant one may be the inclusion of
Code Block | <point key="canvasLocation" x="-842.5" y="-822.5"/> |
before the closing </window> tag in the modified version.
Update: removing the above line seems to fix the problem!
Code Block | Extract from Modified Preferences Window with controls in inverted order |
|
| <window title="Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="379" userLabel="Preferences" customClass="NSPanel"> |
| <windowStyleMask key="styleMask" titled="YES" closable="YES"/> |
| <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> |
| <rect key="contentRect" x="391" y="507" width="269" height="375"/> |
| <rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/> |
| <view key="contentView" id="380" customClass="NSButton"> |
| ..... |
| </view> |
| <point key="canvasLocation" x="-842.5" y="-822.5"/> |
| </window> |
Code Block | Original Preferences Window with controls in expected order |
|
| <window title="Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="379" userLabel="Preferences" customClass="NSPanel"> |
| <windowStyleMask key="styleMask" titled="YES" closable="YES"/> |
| <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> |
| <rect key="contentRect" x="391" y="507" width="249" height="199"/> |
| <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1028"/> |
| <view key="contentView" id="380"> |
| .... |
| </view> |
|
| </window> |