Instead of setting the coordinates for the window, call [window center] in [awakeFromNib] master 2.0
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 5 Jun 2008 20:23:32 +0000 (16:23 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 5 Jun 2008 20:23:32 +0000 (16:23 -0400)
* English.lproj/MainMenu.nib: Add an outlet for NSWindow in AppDelegate
* Source/AppController.m+h: Add an ivar for NSWindow
(awakeFromNib): New method to center window

English.lproj/MainMenu.nib/designable.nib
English.lproj/MainMenu.nib/keyedobjects.nib
Source/AppController.h
Source/AppController.m

index 06bd69424bfe0863609a27b88b48b267b831e029..9eb302d46cbd0f499fbbe87e2f3e7c7ec0c26b1a 100644 (file)
@@ -9,7 +9,7 @@
                <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
                        <bool key="EncodedWithXMLCoder">YES</bool>
                        <integer value="106"/>
-                       <integer value="381"/>
+                       <integer value="371"/>
                </object>
                <object class="NSArray" key="IBDocument.PluginDependencies">
                        <bool key="EncodedWithXMLCoder">YES</bool>
                                        </object>
                                        <int key="connectionID">420</int>
                                </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">window</string>
+                                               <reference key="source" ref="953132641"/>
+                                               <reference key="destination" ref="972006081"/>
+                                       </object>
+                                       <int key="connectionID">422</int>
+                               </object>
                        </object>
                        <object class="IBMutableOrderedSet" key="objectRecords">
                                <object class="NSArray" key="orderedObjects">
                                        <reference ref="9"/>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <reference ref="9"/>
-                                       <string>{{417, 422}, {568, 356}}</string>
+                                       <string>{{57, 173}, {568, 356}}</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>{{417, 422}, {568, 356}}</string>
+                                       <string>{{57, 173}, {568, 356}}</string>
                                        <reference ref="9"/>
                                        <string>{{492, 421}, {568, 356}}</string>
                                        <reference ref="9"/>
                                </object>
                        </object>
                        <nil key="sourceID"/>
-                       <int key="maxID">421</int>
+                       <int key="maxID">422</int>
                </object>
                <object class="IBClassDescriber" key="IBDocument.Classes">
                        <object class="NSMutableArray" key="referencedPartialClassDescriptions">
                                                <object class="NSMutableArray" key="dict.sortedKeys">
                                                        <bool key="EncodedWithXMLCoder">YES</bool>
                                                        <string>tilesField</string>
+                                                       <string>window</string>
                                                        <string>wordlist</string>
                                                        <string>wordlistView</string>
                                                </object>
                                                <object class="NSMutableArray" key="dict.values">
                                                        <bool key="EncodedWithXMLCoder">YES</bool>
                                                        <string>NSTextField</string>
+                                                       <string>NSWindow</string>
                                                        <string>NSArrayController</string>
                                                        <string>NSTableView</string>
                                                </object>
index 20d7dad5943df4c6880826d99ed3df3e9a678be5..1e20ebe7da514a85c644ab1590ffcff3069696fe 100644 (file)
Binary files a/English.lproj/MainMenu.nib/keyedobjects.nib and b/English.lproj/MainMenu.nib/keyedobjects.nib differ
index 8f2eebca8ccfc6b1488056a2443ed06ab39c8e8c..30a1ee559a4d1879d5c4bccbedf3082301506d56 100644 (file)
@@ -24,6 +24,7 @@
        // interface
        IBOutlet NSTextField *tilesField;
        IBOutlet NSTableView *wordlistView;
+       IBOutlet NSWindow *window;
        
        IBOutlet NSArrayController *wordlist;
 }
index 6a37bb44eb8d559248a3e76d101b20358b57708c..9ccfed8ed4e2843cb6e81b61bf8e927683a9ab13 100644 (file)
        return self;
 }
 
+/**
+ * Awake from nib
+ */
+- (void)awakeFromNib
+{
+       [window center];
+}
+
 /**
  * Destructor
  */