diff --git a/Example/AppDelegate.h b/Example/AppDelegate.h index b4a6746..8aa046d 100644 --- a/Example/AppDelegate.h +++ b/Example/AppDelegate.h @@ -41,7 +41,7 @@ @interface AppDelegate : NSObject -@property (assign) IBOutlet NSWindow *window; +@property (strong) IBOutlet NSWindow *window; @property (strong) IBOutlet NSArrayController *tweetsArrayController; @end diff --git a/Example/AppDelegate.m b/Example/AppDelegate.m index 0620bee..15cc02e 100644 --- a/Example/AppDelegate.m +++ b/Example/AppDelegate.m @@ -62,10 +62,17 @@ @synthesize tweetsArrayController = _tweetsArrayController; - (void)applicationDidFinishLaunching:(NSNotification *)notification { - [Tweet publicTimelineTweetsWithBlock:^(NSArray *tweets) { - self.tweetsArrayController.content = tweets; - NSLog(@"Tweets: %@", tweets); - }]; + [self.window makeKeyAndOrderFront:self]; + + [Tweet publicTimelineTweetsWithBlock:^(NSArray *tweets) { + self.tweetsArrayController.content = tweets; + }]; +} + +- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag { + [self.window makeKeyAndOrderFront:self]; + + return YES; } @end diff --git a/Example/MainMenu.xib b/Example/MainMenu.xib index 3236771..fc8fce1 100644 --- a/Example/MainMenu.xib +++ b/Example/MainMenu.xib @@ -168,6 +168,137 @@ _NSAppleMenu + + + File + + 2147483647 + + + submenuAction: + + File + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open… + o + 1048576 + 2147483647 + + + + + + Open Recent + + 2147483647 + + + submenuAction: + + Open Recent + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1048576 + 2147483647 + + + + + + Revert to Saved + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Page Setup… + P + 1048576 + 2147483647 + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + Window @@ -283,7 +414,7 @@ {373, 498} - + _NS:1197 YES @@ -382,7 +513,7 @@ 6 System controlBackgroundColor - + 3 MC42NjY2NjY2NjY3AA @@ -452,6 +583,9 @@ YES YES + + NSWindowController + @@ -478,7 +612,7 @@ - 495 + 615 @@ -536,6 +670,86 @@ 493 + + + print: + + + + 632 + + + + performClose: + + + + 634 + + + + saveDocumentAs: + + + + 637 + + + + runPageLayout: + + + + 638 + + + + saveDocument: + + + + 639 + + + + revertDocumentToSaved: + + + + 640 + + + + newDocument: + + + + 635 + + + + clearRecentDocuments: + + + + 636 + + + + openDocument: + + + + 633 + + + + delegate + + + + 612 + window @@ -552,6 +766,14 @@ 609 + + + windowController + + + + 614 + value: arrangedObjects @@ -571,20 +793,20 @@ textField - + 274 YES - - + + 266 {{84, 50}, {236, 17}} - - + + {250, 750} YES - + 67239488 272631808 Username @@ -593,14 +815,14 @@ 14 16 - - + + 6 System controlColor - + - + 6 System controlTextColor @@ -608,8 +830,8 @@ - - + + 268 YES @@ -624,11 +846,11 @@ {{14, 7}, {56, 56}} - - + + _NS:9 YES - + 130560 33554432 _NS:9 @@ -639,16 +861,16 @@ YES - - + + 268 {{84, 10}, {236, 34}} - + _NS:9 {250, 750} YES - + 67239424 272629760 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad mi. @@ -658,27 +880,27 @@ 16 _NS:9 - - - + + + {{5, 5}, {320, 70}} - + - + 580 value: objectValue.user.username - - + + - - + + value: objectValue.user.username value objectValue.user.username @@ -690,11 +912,11 @@ value: objectValue.text - - + + - - + + value: objectValue.text value objectValue.text @@ -703,6 +925,14 @@ 605 + + + window + + + + 613 + @@ -741,6 +971,7 @@ + @@ -948,7 +1179,7 @@ YES - + @@ -969,56 +1200,162 @@ 577 - + YES - - - + + + 578 - + YES - + - + 579 - - + + 594 - + YES - + - + 595 - - + + 596 - + YES - + - + 597 - - + + + + + 611 + + + + + 617 + + + YES + + + + + + 618 + + + YES + + + + + + + + + + + + + + + + 622 + + + + + 623 + + + + + 624 + + + + + 625 + + + + + 626 + + + + + 627 + + + + + 628 + + + + + 629 + + + + + 619 + + + + + 621 + + + YES + + + + + + 630 + + + YES + + + + + + 631 + + + + + 620 + + @@ -1073,6 +1410,22 @@ 595.IBPluginDependency 596.IBPluginDependency 597.IBPluginDependency + 611.IBPluginDependency + 617.IBPluginDependency + 618.IBPluginDependency + 619.IBPluginDependency + 620.IBPluginDependency + 621.IBPluginDependency + 622.IBPluginDependency + 623.IBPluginDependency + 624.IBPluginDependency + 625.IBPluginDependency + 626.IBPluginDependency + 627.IBPluginDependency + 628.IBPluginDependency + 629.IBPluginDependency + 630.IBPluginDependency + 631.IBPluginDependency 92.IBPluginDependency @@ -1113,7 +1466,7 @@ YES - + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1128,6 +1481,22 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -1142,7 +1511,7 @@ - 609 + 640