From 08281778714c05bd9ca4fbebbb63c16480f30942 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 30 Apr 2011 19:42:24 -0400 Subject: [PATCH] Hook up the EvalController and modal interface via the DebuggerController toolbar --- English.lproj/Debugger.xib | 62 +++++++++++++++++++++++++++++++++---- English.lproj/Eval.xib | 33 ++++++++++++++++++-- Source/DebuggerController.h | 1 + Source/DebuggerController.m | 11 +++++++ Source/EvalController.h | 2 ++ Source/EvalController.m | 6 ++++ 6 files changed, 106 insertions(+), 9 deletions(-) diff --git a/English.lproj/Debugger.xib b/English.lproj/Debugger.xib index 7b61d30..ead3377 100644 --- a/English.lproj/Debugger.xib +++ b/English.lproj/Debugger.xib @@ -2,7 +2,7 @@ 1050 - 10H574 + 10J869 804 1038.35 461.00 @@ -12,7 +12,7 @@ YES - + YES @@ -55,6 +55,7 @@ YES YES + 05157554-5CF3-45B4-9306-239A1F7E8130 0DD9463E-4676-43E6-B885-7A9CB1137956 16B58F9D-A05F-41F5-BD7C-37FD7619A84A 4F493FF4-D55D-4881-B16D-54ED9DC66FF7 @@ -69,6 +70,28 @@ YES + + + 05157554-5CF3-45B4-9306-239A1F7E8130 + + Evaluate Code + Evaluate + + + + NSImage + NSNetwork + + + + {0, 0} + {0, 0} + YES + YES + -1 + YES + 0 + 0DD9463E-4676-43E6-B885-7A9CB1137956 @@ -403,6 +426,7 @@ + @@ -905,6 +929,7 @@ 1 _doScroller: + 0.0078534031413612579 0.99738899999999997 @@ -1687,6 +1712,14 @@ 599 + + + showEvalWindow: + + + + 602 + @@ -1795,6 +1828,7 @@ + @@ -2121,6 +2155,11 @@ + + 600 + + + @@ -2212,6 +2251,7 @@ 591.IBPluginDependency 592.IBPluginDependency 597.IBPluginDependency + 600.IBPluginDependency 7.IBEditorWindowLastContentRect 7.IBPluginDependency 7.IBViewEditorWindowController.showingBoundsRectangles @@ -2316,6 +2356,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin {{366, 315}, {769, 501}} com.apple.InterfaceBuilder.CocoaPlugin @@ -2350,7 +2391,7 @@ - 599 + 602 @@ -2359,13 +2400,13 @@ BSSourceView NSView - delegate + delegate_ id - delegate + delegate_ - delegate + delegate_ id @@ -2399,6 +2440,7 @@ YES attachedToggled: run: + showEvalWindow: showInspectorWindow: stepIn: stepOut: @@ -2414,6 +2456,7 @@ id id id + id @@ -2422,6 +2465,7 @@ YES attachedToggled: run: + showEvalWindow: showInspectorWindow: stepIn: stepOut: @@ -2438,6 +2482,10 @@ run: id + + showEvalWindow: + id + showInspectorWindow: id @@ -3181,6 +3229,7 @@ HUDIcon.png NSMenuCheckmark NSMenuMixedState + NSNetwork NSSwitch NSToolbarCustomizeToolbarItemImage Run.png @@ -3194,6 +3243,7 @@ {128, 128} {9, 8} {7, 2} + {32, 32} {15, 15} {32, 32} {128, 128} diff --git a/English.lproj/Eval.xib b/English.lproj/Eval.xib index c7e4efd..7fe9b80 100644 --- a/English.lproj/Eval.xib +++ b/English.lproj/Eval.xib @@ -190,7 +190,7 @@ -2038284033 129 - + Gw 200 25 @@ -222,6 +222,22 @@ 16 + + + window + + + + 17 + + + + closeWindow: + + + + 18 + @@ -394,7 +410,7 @@ {{322, 586}, {480, 270}} com.apple.InterfaceBuilder.CocoaPlugin {{322, 586}, {480, 270}} - + {196, 240} {{202, 428}, {480, 270}} com.apple.InterfaceBuilder.CocoaPlugin @@ -446,7 +462,7 @@ - 16 + 18 @@ -454,6 +470,17 @@ EvalController NSWindowController + + closeWindow: + id + + + closeWindow: + + closeWindow: + id + + YES diff --git a/Source/DebuggerController.h b/Source/DebuggerController.h index 9471729..c78efed 100644 --- a/Source/DebuggerController.h +++ b/Source/DebuggerController.h @@ -56,6 +56,7 @@ @property(readonly) NSWindow* inspector; - (IBAction)showInspectorWindow:(id)sender; +- (IBAction)showEvalWindow:(id)sender; - (void)resetDisplays; diff --git a/Source/DebuggerController.m b/Source/DebuggerController.m index b7b069c..ed4d852 100644 --- a/Source/DebuggerController.m +++ b/Source/DebuggerController.m @@ -19,6 +19,7 @@ #import "AppDelegate.h" #import "BSSourceView.h" #import "BreakpointManager.h" +#import "EvalController.h" #import "NSXMLElementAdditions.h" @interface DebuggerController (Private) @@ -109,6 +110,16 @@ [inspector orderOut:sender]; } +/** + * Runs the eval window sheet. + */ +- (IBAction)showEvalWindow:(id)sender +{ + // The |controller| will release itself on close. + EvalController* controller = [[EvalController alloc] initWithBackEnd:connection]; + [controller runModalForWindow:[self window]]; +} + /** * Resets all the displays to be empty */ diff --git a/Source/EvalController.h b/Source/EvalController.h index fe68bc6..3e7ecbc 100644 --- a/Source/EvalController.h +++ b/Source/EvalController.h @@ -34,4 +34,6 @@ - (void)runModalForWindow:(NSWindow*)parent; +- (IBAction)closeWindow:(id)sender; + @end diff --git a/Source/EvalController.m b/Source/EvalController.m index 49d8259..d90b7a2 100644 --- a/Source/EvalController.m +++ b/Source/EvalController.m @@ -50,4 +50,10 @@ { } +- (IBAction)closeWindow:(id)sender +{ + [self close]; + [NSApp endSheet:[self window]]; +} + @end -- 2.43.5