[37562] branches/gsoc08-framework/MacPortsFrameworkTester
armahg at macports.org
armahg at macports.org
Fri Jun 13 09:17:26 PDT 2008
Revision: 37562
http://trac.macosforge.org/projects/macports/changeset/37562
Author: armahg at macports.org
Date: 2008-06-13 09:17:23 -0700 (Fri, 13 Jun 2008)
Log Message:
-----------
Fixed properties on .m and .h files. Added 'Clear Text' button. This xcodeproj might come handy for some tests that might be cumbersome to run with OCUnit
Modified Paths:
--------------
branches/gsoc08-framework/MacPortsFrameworkTester/English.lproj/MainMenu.xib
branches/gsoc08-framework/MacPortsFrameworkTester/MPInterpreterTest.h
branches/gsoc08-framework/MacPortsFrameworkTester/MPInterpreterTest.m
branches/gsoc08-framework/MacPortsFrameworkTester/SharedTextView.h
branches/gsoc08-framework/MacPortsFrameworkTester/SharedTextView.m
Modified: branches/gsoc08-framework/MacPortsFrameworkTester/English.lproj/MainMenu.xib
===================================================================
--- branches/gsoc08-framework/MacPortsFrameworkTester/English.lproj/MainMenu.xib 2008-06-13 13:19:32 UTC (rev 37561)
+++ branches/gsoc08-framework/MacPortsFrameworkTester/English.lproj/MainMenu.xib 2008-06-13 16:17:23 UTC (rev 37562)
@@ -8,7 +8,7 @@
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="57"/>
+ <integer value="106"/>
<integer value="372"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
@@ -33,7 +33,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="694149608">
<reference key="NSMenu" ref="649796088"/>
- <string key="NSTitle">NewApplication</string>
+ <string key="NSTitle">MacPortsFrameworkTester</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
@@ -47,12 +47,12 @@
</object>
<string key="NSAction">submenuAction:</string>
<object class="NSMenu" key="NSSubmenu" id="110575045">
- <string key="NSTitle">NewApplication</string>
+ <string key="NSTitle">MacPortsFrameworkTester</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="238522557">
<reference key="NSMenu" ref="110575045"/>
- <string key="NSTitle">About NewApplication</string>
+ <string key="NSTitle">About MacPortsFrameworkTester</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
@@ -119,7 +119,7 @@
</object>
<object class="NSMenuItem" id="755159360">
<reference key="NSMenu" ref="110575045"/>
- <string key="NSTitle">Hide NewApplication</string>
+ <string key="NSTitle">Hide MacPortsFrameworkTester</string>
<string key="NSKeyEquiv">h</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
@@ -157,7 +157,7 @@
</object>
<object class="NSMenuItem" id="632727374">
<reference key="NSMenu" ref="110575045"/>
- <string key="NSTitle">Quit NewApplication</string>
+ <string key="NSTitle">Quit MacPortsFrameworkTester</string>
<string key="NSKeyEquiv">q</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
@@ -1089,7 +1089,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="238773614">
<reference key="NSMenu" ref="374024848"/>
- <string key="NSTitle">NewApplication Help</string>
+ <string key="NSTitle">MacPortsFrameworkTester Help</string>
<string key="NSKeyEquiv">?</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
@@ -1105,7 +1105,7 @@
<object class="NSWindowTemplate" id="972006081">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{335, 138}, {716, 612}}</string>
+ <string key="NSWindowRect">{{295, 70}, {716, 617}}</string>
<int key="NSWTFlags">1946157056</int>
<string key="NSWindowTitle">MacPortsFrameworkTester</string>
<string key="NSWindowClass">NSWindow</string>
@@ -1118,8 +1118,8 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSBox" id="814662227">
<reference key="NSNextResponder" ref="439893737"/>
- <int key="NSvFlags">12</int>
- <string key="NSFrame">{{12, 434}, {692, 5}}</string>
+ <int key="NSvFlags">15</int>
+ <string key="NSFrame">{{12, 439}, {692, 5}}</string>
<reference key="NSSuperview" ref="439893737"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1153,7 +1153,7 @@
<object class="NSButton" id="198355047">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{6, 564}, {126, 32}}</string>
+ <string key="NSFrame">{{6, 537}, {126, 32}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="378829031">
@@ -1172,7 +1172,7 @@
</object>
<object class="NSScrollView" id="758536856">
<reference key="NSNextResponder" ref="439893737"/>
- <int key="NSvFlags">256</int>
+ <int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSClipView" id="555292888">
@@ -1206,7 +1206,7 @@
<string>WebURLsWithTitlesPboardType</string>
</object>
</object>
- <string key="NSFrameSize">{675, 56}</string>
+ <string key="NSFrameSize">{675, 14}</string>
<reference key="NSSuperview" ref="555292888"/>
<object class="NSTextContainer" key="NSTextContainer" id="678361277">
<object class="NSLayoutManager" key="NSLayoutManager">
@@ -1280,8 +1280,8 @@
<nil key="NSDefaultParagraphStyle"/>
</object>
<int key="NSTVFlags">6</int>
- <string key="NSMaxSize">{675, 1e+07}</string>
- <string key="NSMinize">{222, 56}</string>
+ <string key="NSMaxSize">{1367, 1e+07}</string>
+ <string key="NSMinize">{222, 0}</string>
<nil key="NSDelegate"/>
</object>
</object>
@@ -1317,7 +1317,7 @@
<double key="NSPercent">9.456522e-01</double>
</object>
</object>
- <string key="NSFrame">{{12, 15}, {692, 413}}</string>
+ <string key="NSFrame">{{12, 20}, {692, 413}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSNextKeyView" ref="555292888"/>
<int key="NSsFlags">18</int>
@@ -1325,11 +1325,31 @@
<reference key="NSHScroller" ref="937205657"/>
<reference key="NSContentView" ref="555292888"/>
</object>
+ <object class="NSButton" id="273048631">
+ <reference key="NSNextResponder" ref="439893737"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{6, 569}, {105, 32}}</string>
+ <reference key="NSSuperview" ref="439893737"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="443044707">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents">Clear Text</string>
+ <reference key="NSSupport" ref="691376912"/>
+ <reference key="NSControlView" ref="273048631"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">129</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
</object>
- <string key="NSFrameSize">{716, 612}</string>
+ <string key="NSFrameSize">{716, 617}</string>
<reference key="NSSuperview"/>
</object>
- <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+ <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
<object class="NSCustomObject" id="755631768">
@@ -1338,8 +1358,8 @@
<object class="NSCustomObject" id="779240536">
<string key="NSClassName">SharedTextView</string>
</object>
- <object class="NSCustomObject" id="742698456">
- <string key="NSClassName">NSObject</string>
+ <object class="NSCustomObject" id="335044091">
+ <string key="NSClassName">MPInterpreterTest</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
@@ -1873,6 +1893,30 @@
</object>
<int key="connectionID">449</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">textView</string>
+ <reference key="source" ref="779240536"/>
+ <reference key="destination" ref="758536856"/>
+ </object>
+ <int key="connectionID">462</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">testGetVariableArray:</string>
+ <reference key="source" ref="335044091"/>
+ <reference key="destination" ref="198355047"/>
+ </object>
+ <int key="connectionID">463</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">clearText:</string>
+ <reference key="source" ref="779240536"/>
+ <reference key="destination" ref="273048631"/>
+ </object>
+ <int key="connectionID">466</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -2460,8 +2504,9 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="814662227"/>
+ <reference ref="758536856"/>
+ <reference ref="273048631"/>
<reference ref="198355047"/>
- <reference ref="758536856"/>
</object>
<reference key="parent" ref="972006081"/>
</object>
@@ -2826,10 +2871,24 @@
<reference key="parent" ref="1049"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">460</int>
- <reference key="object" ref="742698456"/>
+ <int key="objectID">461</int>
+ <reference key="object" ref="335044091"/>
<reference key="parent" ref="1049"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">464</int>
+ <reference key="object" ref="273048631"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="443044707"/>
+ </object>
+ <reference key="parent" ref="439893737"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">465</int>
+ <reference key="object" ref="443044707"/>
+ <reference key="parent" ref="273048631"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -2841,6 +2900,7 @@
<string>-3.IBPluginDependency</string>
<string>103.IBPluginDependency</string>
<string>103.ImportedFromIB2</string>
+ <string>106.IBEditorWindowLastContentRect</string>
<string>106.IBPluginDependency</string>
<string>106.ImportedFromIB2</string>
<string>106.editorWindowContentRectSynchronizationRect</string>
@@ -2899,6 +2959,7 @@
<string>203.ImportedFromIB2</string>
<string>204.IBPluginDependency</string>
<string>204.ImportedFromIB2</string>
+ <string>205.IBEditorWindowLastContentRect</string>
<string>205.IBPluginDependency</string>
<string>205.ImportedFromIB2</string>
<string>205.editorWindowContentRectSynchronizationRect</string>
@@ -2942,6 +3003,7 @@
<string>236.ImportedFromIB2</string>
<string>239.IBPluginDependency</string>
<string>239.ImportedFromIB2</string>
+ <string>24.IBEditorWindowLastContentRect</string>
<string>24.IBPluginDependency</string>
<string>24.ImportedFromIB2</string>
<string>24.editorWindowContentRectSynchronizationRect</string>
@@ -2951,6 +3013,7 @@
<string>29.WindowOrigin</string>
<string>29.editorWindowContentRectSynchronizationRect</string>
<string>295.IBPluginDependency</string>
+ <string>296.IBEditorWindowLastContentRect</string>
<string>296.IBPluginDependency</string>
<string>296.editorWindowContentRectSynchronizationRect</string>
<string>297.IBPluginDependency</string>
@@ -3030,7 +3093,9 @@
<string>457.IBPluginDependency</string>
<string>458.IBPluginDependency</string>
<string>459.IBPluginDependency</string>
- <string>460.IBPluginDependency</string>
+ <string>461.IBPluginDependency</string>
+ <string>464.IBPluginDependency</string>
+ <string>465.IBPluginDependency</string>
<string>5.IBPluginDependency</string>
<string>5.ImportedFromIB2</string>
<string>56.IBPluginDependency</string>
@@ -3057,6 +3122,7 @@
<string>79.ImportedFromIB2</string>
<string>80.IBPluginDependency</string>
<string>80.ImportedFromIB2</string>
+ <string>81.IBEditorWindowLastContentRect</string>
<string>81.IBPluginDependency</string>
<string>81.ImportedFromIB2</string>
<string>81.editorWindowContentRectSynchronizationRect</string>
@@ -3074,6 +3140,7 @@
<string>com.apple.InterfaceBuilderKit</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
+ <string>{{596, 256}, {289, 23}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{596, 852}, {216, 23}}</string>
@@ -3132,6 +3199,7 @@
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
+ <string>{{471, 41}, {243, 243}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{187, 434}, {243, 243}}</string>
@@ -3175,15 +3243,17 @@
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
+ <string>{{631, 211}, {197, 73}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{525, 802}, {197, 73}}</string>
- <string>{{207, 285}, {478, 20}}</string>
+ <string>{{100, 279}, {557, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{74, 862}</string>
<string>{{6, 978}, {478, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{581, 241}, {234, 43}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{475, 832}, {234, 43}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -3201,15 +3271,15 @@
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <string>{{44, 131}, {716, 612}}</string>
+ <string>{{48, 98}, {716, 617}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{44, 131}, {716, 612}}</string>
+ <string>{{48, 98}, {716, 617}}</string>
<reference ref="9"/>
<string>{{33, 99}, {480, 360}}</string>
<string>{3.40282e+38, 3.40282e+38}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{437, 242}, {86, 43}}</string>
+ <string>{{515, 241}, {86, 43}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -3265,10 +3335,12 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <string>{{219, 102}, {245, 183}}</string>
+ <string>{{218, 101}, {318, 183}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{23, 794}, {245, 183}}</string>
@@ -3290,6 +3362,7 @@
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
+ <string>{{429, 81}, {199, 203}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{145, 474}, {199, 203}}</string>
@@ -3321,17 +3394,33 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">460</int>
+ <int key="maxID">466</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
+ <string key="className">MPInterpreterTest</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">testGetVariableArray:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">MPInterpreterTest.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">SharedTextView</string>
<string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">clearText:</string>
+ <string key="NS.object.0">id</string>
+ </object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">textView</string>
- <string key="NS.object.0">NSTextView</string>
+ <string key="NS.object.0">NSScrollView</string>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
Modified: branches/gsoc08-framework/MacPortsFrameworkTester/MPInterpreterTest.h
===================================================================
--- branches/gsoc08-framework/MacPortsFrameworkTester/MPInterpreterTest.h 2008-06-13 13:19:32 UTC (rev 37561)
+++ branches/gsoc08-framework/MacPortsFrameworkTester/MPInterpreterTest.h 2008-06-13 16:17:23 UTC (rev 37562)
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
* MacPorts.Framework
*
* Authors:
@@ -34,10 +34,14 @@
*/
#import <Cocoa/Cocoa.h>
+#import <MacPorts/MacPorts.h>
@interface MPInterpreterTest : NSObject {
-
+ MPInterpreter * interp;
}
+-(IBAction)testGetVariableArray:(id)sender;
+
+
@end
Modified: branches/gsoc08-framework/MacPortsFrameworkTester/MPInterpreterTest.m
===================================================================
--- branches/gsoc08-framework/MacPortsFrameworkTester/MPInterpreterTest.m 2008-06-13 13:19:32 UTC (rev 37561)
+++ branches/gsoc08-framework/MacPortsFrameworkTester/MPInterpreterTest.m 2008-06-13 16:17:23 UTC (rev 37562)
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
* MacPorts.Framework
*
* Authors:
@@ -34,8 +34,34 @@
*/
#import "MPInterpreterTest.h"
+#import "SharedTextView.h"
@implementation MPInterpreterTest
+- (IBAction)testGetVariableArray:(id)sender {
+ interp = [MPInterpreter sharedInterpreter];
+
+ NSString * testOutput = @"";
+ // Check to make sure interp is not nil
+ testOutput = [testOutput stringByAppendingString:@"Testing for Creation of MSInterpreter object: \n"];
+
+
+ // Question ... which is more efficient?
+ // Creating a single SharedTextView object and using it ... or
+ // calling the class method [SharedTextView sharedTextView] over and
+ // over again?
+ if(interp){
+ testOutput = [testOutput stringByAppendingString:@"Interpreter object is not nil \n"];
+ [[SharedTextView sharedTextView] writeText:testOutput];
+ }
+ else {
+ testOutput = [testOutput stringByAppendingString:@"Interpreter object \
+ is not nil\n"];
+ [[SharedTextView sharedTextView] writeText:testOutput];
+ }
+
+}
+
+
@end
Modified: branches/gsoc08-framework/MacPortsFrameworkTester/SharedTextView.h
===================================================================
--- branches/gsoc08-framework/MacPortsFrameworkTester/SharedTextView.h 2008-06-13 13:19:32 UTC (rev 37561)
+++ branches/gsoc08-framework/MacPortsFrameworkTester/SharedTextView.h 2008-06-13 16:17:23 UTC (rev 37562)
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
* MacPorts.Framework
*
* Authors:
@@ -37,9 +37,14 @@
@interface SharedTextView : NSObject {
- IBOutlet NSTextView *textView;
+ IBOutlet NSScrollView *textView;
}
+ (SharedTextView*)sharedTextView;
+- (IBAction)clearText:(id)sender;
+- (void)appendText:(NSString *)text;
+- (void)writeText:(NSString *) text;
+
+
@end
Modified: branches/gsoc08-framework/MacPortsFrameworkTester/SharedTextView.m
===================================================================
--- branches/gsoc08-framework/MacPortsFrameworkTester/SharedTextView.m 2008-06-13 13:19:32 UTC (rev 37561)
+++ branches/gsoc08-framework/MacPortsFrameworkTester/SharedTextView.m 2008-06-13 16:17:23 UTC (rev 37562)
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
* MacPorts.Framework
*
* Authors:
@@ -80,5 +80,17 @@
return self;
}
+- (IBAction)clearText:(id)sender {
+ [self writeText:@""];
+}
+- (void)writeText:(NSString *)text {
+ [[textView documentView] setString:text];
+}
+
+- (void)appendText:(NSString *)text {
+ [[textView documentView] insertText:text];
+}
+
+
@end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080613/1b88cf16/attachment-0001.htm
More information about the macports-changes
mailing list