[38423] branches/gsoc08-framework/MacPorts_Framework

armahg at macports.org armahg at macports.org
Sat Jul 19 14:36:11 PDT 2008


Revision: 38423
          http://trac.macosforge.org/projects/macports/changeset/38423
Author:   armahg at macports.org
Date:     2008-07-19 14:36:10 -0700 (Sat, 19 Jul 2008)
Log Message:
-----------
Added MPNotifications class. Added (as at yet undocumented) code for filtering Framework notifications and getting information on function responsible for sending notification.

Modified Paths:
--------------
    branches/gsoc08-framework/MacPorts_Framework/MPInterpreter.h
    branches/gsoc08-framework/MacPorts_Framework/MPInterpreter.m
    branches/gsoc08-framework/MacPorts_Framework/MPMacPorts.h
    branches/gsoc08-framework/MacPorts_Framework/MPMacPorts.m
    branches/gsoc08-framework/MacPorts_Framework/MPMacPortsTest.h
    branches/gsoc08-framework/MacPorts_Framework/MPMacPortsTest.m
    branches/gsoc08-framework/MacPorts_Framework/MPPort.h
    branches/gsoc08-framework/MacPorts_Framework/MPPort.m
    branches/gsoc08-framework/MacPorts_Framework/MacPorts.Framework.xcodeproj/Armahg.mode1v3
    branches/gsoc08-framework/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj
    branches/gsoc08-framework/MacPorts_Framework/MacPorts.h
    branches/gsoc08-framework/MacPorts_Framework/Makefile
    branches/gsoc08-framework/MacPorts_Framework/ToDo.txt
    branches/gsoc08-framework/MacPorts_Framework/init.tcl
    branches/gsoc08-framework/MacPorts_Framework/notifications.m

Added Paths:
-----------
    branches/gsoc08-framework/MacPorts_Framework/MPNotifications.h
    branches/gsoc08-framework/MacPorts_Framework/MPNotifications.m

Removed Paths:
-------------
    branches/gsoc08-framework/MacPorts_Framework/MPNotificationsListener.h
    branches/gsoc08-framework/MacPorts_Framework/MPNotificationsListener.m

Modified: branches/gsoc08-framework/MacPorts_Framework/MPInterpreter.h
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MPInterpreter.h	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MPInterpreter.h	2008-07-19 21:36:10 UTC (rev 38423)
@@ -41,7 +41,7 @@
 
 #import <Cocoa/Cocoa.h>
 #include <tcl.h>  
-#import "MPNotificationsListener.h"
+#import "MPNotifications.h"
 
 #define	MPPackage			@"macports"
 #define MPPackageVersion	@"1.0"
@@ -56,10 +56,11 @@
 @interface MPInterpreter : NSObject {
 
 	Tcl_Interp* _interpreter;
-
+	
 }
 
-/*
+
+/*!
  @brief Return singleton shared MPInterpreter instance
  */
 + (MPInterpreter *)sharedInterpreter;

Modified: branches/gsoc08-framework/MacPorts_Framework/MPInterpreter.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MPInterpreter.m	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MPInterpreter.m	2008-07-19 21:36:10 UTC (rev 38423)
@@ -36,11 +36,14 @@
 #import "MPInterpreter.h"
 
 @implementation MPInterpreter
+
 #pragma mark Notifications Code 
 int Notifications_Send(int objc, Tcl_Obj *CONST objv[], int global, Tcl_Interp *interpreter) {
 	//NSLog(@" INSIDE Notifications_Send METHOD");
-	NSString *name , *msg;
+	NSString *name;
+	NSMutableString *msg;
 	NSMutableDictionary *info = nil;
+	MPNotifications *mln = [MPNotifications sharedListener];
 	
 	int tclCount;
 	int tclResult;
@@ -48,6 +51,14 @@
 	const char **tclElements;
 	
 	name = [NSString stringWithUTF8String:Tcl_GetString(*objv)];
+	
+	//Name and Notification constants should match. Convention
+	//used is MPPriorityNotification. Is it ok to just return TCL_OK ?
+	if( [mln checkIfNotificationBlocked:name] ){
+		return TCL_OK;
+	}
+	
+	
 	++objv; --objc;
 	
 	tclResult = Tcl_SplitList(interpreter, Tcl_GetString(*objv), &tclCount, &tclElements);
@@ -60,12 +71,28 @@
 		//Get ui_* message separately 
 		++objv; --objc;
 		if(objv != NULL) {
-			msg = [NSString stringWithUTF8String:Tcl_GetString(*objv)];
+			msg = [NSMutableString stringWithUTF8String:Tcl_GetString(*objv)];
+			
 			//strip off "--->" over here
-			msg = [msg stringByReplacingOccurrencesOfString:@"--->" withString:@""];
-			[info setObject:msg forKey:[NSString stringWithString:@"Message"]];
+			NSArray * temp = [msg componentsSeparatedByString:@"--->"];
+			[msg setString:[temp componentsJoinedByString:@""]];
+			[info setObject:msg forKey:@"Message"];
 		}
 		
+		//Get the Tcl function that called this method
+		if (! [[mln performingTclCommand] isEqualToString:@""]) {
+			NSArray * cmd = [[mln performingTclCommand] componentsSeparatedByString:@"_"];
+			
+			//if code is working right, this value should always be YES
+			//when we are in this part of the code
+			if([cmd count] > 0) {
+				NSLog(@"Class type is %@", NSStringFromClass([[cmd objectAtIndex:0] class]));
+				
+				if( [[cmd objectAtIndex:0] isEqualToString:@"YES"]) {
+					[info setObject:[cmd objectAtIndex:1] forKey:@"Function"];
+				}
+			}
+		}		
 		if (global != 0) {
 			[[NSDistributedNotificationCenter defaultCenter] postNotificationName:name object:nil userInfo:info];
 		} else {
@@ -81,7 +108,14 @@
 }
 
 int Notifications_Command(ClientData clientData, Tcl_Interp *interpreter, int objc, Tcl_Obj *CONST objv[]) {
-	//NSAutoreleasePool *pool = [NSAutoreleasePool new];
+	MPNotifications * mln = [MPNotifications sharedListener]; 
+	
+	//Should I do the filtering in Notificaitons_Send instead?
+	if( [mln checkIfNotificationBlocked:MPALL] ) {
+		NSLog(@"ALL NOTIFICATIONS BLOCKED");
+		return TCL_OK;
+	}
+	
 	NSString *action = nil;
 	int returnCode = TCL_ERROR;
 	
@@ -100,10 +134,10 @@
 		}
 	}
 	
-	//[pool release];
 	return returnCode;
 }
 
+#pragma mark -
 
 #pragma mark MPInterpreter Code
 - (id) init {
@@ -118,12 +152,12 @@
 		}
 		
 		/*
-		//TO DO ...
-		//Use client provided .tcl file if any
+		 //TO DO ...
+		 //Use client provided .tcl file if any
+		 
+		 //Finally load our own init.tcl file
+		 */
 		
-		//Finally load our own init.tcl file
-		*/
-		
 		Tcl_CreateObjCommand(_interpreter, "notifications", Notifications_Command, NULL, NULL);
 		
 		if (Tcl_PkgProvide(_interpreter, "notifications", "1.0") != TCL_OK) {
@@ -134,6 +168,7 @@
 			NSLog(@"Error in Tcl_EvalFile: %s", Tcl_GetStringResult(_interpreter));
 			Tcl_DeleteInterp(_interpreter);
 		}
+		
 	}
 	return self;
 }
@@ -170,7 +205,7 @@
 }
 
 - (void)release {
-    //do nothing
+	
 }
 
 - (id)autorelease {
@@ -234,4 +269,6 @@
 - (NSString *)getVariableAsString:(NSString *)variable {
 	return [NSString stringWithUTF8String:Tcl_GetVar(_interpreter, [variable UTF8String], 0)];
 }
+
+
 @end

Modified: branches/gsoc08-framework/MacPorts_Framework/MPMacPorts.h
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MPMacPorts.h	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MPMacPorts.h	2008-07-19 21:36:10 UTC (rev 38423)
@@ -123,9 +123,6 @@
  */
 - (NSArray *)depends:(MPPort *)port;
 
-/* TO DO: Delete this method
-- (void)exec:(MPPort *)port withTarget:(NSString *)target;
-*/
 
 /*!
  @brief Executes specific target of given MPPort

Modified: branches/gsoc08-framework/MacPorts_Framework/MPMacPorts.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MPMacPorts.m	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MPMacPorts.m	2008-07-19 21:36:10 UTC (rev 38423)
@@ -26,8 +26,8 @@
  *	ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  *	LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  *	CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-						   *	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-						   *	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ *	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ *	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  *	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  *	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  *	POSSIBILITY OF SUCH DAMAGE.
@@ -90,14 +90,22 @@
 - (void)sync {
 	// This needs to throw an exception if things don't go well
 	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPortsSyncStarted" object:nil];
+	[[MPNotifications sharedListener] setPerformingTclCommand:@"YES_sync"];
+	
 	[interpreter evaluateStringAsString:@"mportsync"];
+	
+	[[MPNotifications sharedListener] setPerformingTclCommand:@""];
 	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPortsSyncFinished" object:nil];
 }
 
 - (void)selfUpdate {
 	//Also needs to throw an exception if things don't go well
 	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPortsSelfupdateStarted" object:nil];
+	[[MPNotifications sharedListener] setPerformingTclCommand:@"YES_selfUpdate"];
+	
 	[interpreter evaluateStringAsString:@"macports::selfupdate"];
+	
+	[[MPNotifications sharedListener] setPerformingTclCommand:@""];
 	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPortsSelfupdateFinished" object:nil];
 }
 
@@ -115,6 +123,9 @@
 }
 
 - (NSDictionary *)search:(NSString *)query caseSensitive:(BOOL)sensitivity matchStyle:(NSString *)style field:(NSString *)fieldName {
+	//Should I notify for searches? Will do for now just in case
+	//[[MPNotifications sharedListener] setPerformingTclCommand:@"YES_search"];
+	
 	NSMutableDictionary *result, *newResult;
 	NSEnumerator *enumerator;
 	id key;
@@ -124,20 +135,25 @@
 	} else {
 		caseSensitivity = @"no";
 	}
-	result = [NSMutableDictionary dictionaryWithDictionary:[interpreter dictionaryFromTclListAsString:[interpreter evaluateArrayAsString:[NSArray arrayWithObjects:
-		@"return [mportsearch",
-		query,
-		caseSensitivity,
-		style,
-		fieldName,
-		@"]",
-		nil]]]];
+	result = [NSMutableDictionary dictionaryWithDictionary:
+			  [interpreter dictionaryFromTclListAsString:
+			   [interpreter evaluateArrayAsString:
+				[NSArray arrayWithObjects:
+										  @"return [mportsearch",
+										  query,
+										  caseSensitivity,
+										  style,
+										  fieldName,
+										  @"]",
+										  nil]]]];
 	
 	newResult = [NSMutableDictionary dictionaryWithCapacity:[result count]];
 	enumerator = [result keyEnumerator];
 	while (key = [enumerator nextObject]) {
 		[newResult setObject:[[MPPort alloc] initWithTclListAsString:[result objectForKey:key]] forKey:key];
 	}
+	
+	//[[MPNotifications sharedListener] setPerformingTclCommand:@""];
 	return [NSDictionary dictionaryWithDictionary:newResult];
 }
 
@@ -145,11 +161,7 @@
 	return [port depends];
 }
 
-/* TO DO: Delete this method
-- (void)exec:(MPPort *)port withTarget:(NSString *)target {
-	[port exec:target];
-}
-*/
+
 - (void)exec:(MPPort *)port withTarget:(NSString *)target withOptions:(NSArray *)options withVariants:(NSArray *)variants {
 	[port exec:target withOptions:options withVariants:variants];
 }

Modified: branches/gsoc08-framework/MacPorts_Framework/MPMacPortsTest.h
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MPMacPortsTest.h	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MPMacPortsTest.h	2008-07-19 21:36:10 UTC (rev 38423)
@@ -35,17 +35,17 @@
 
 #import <SenTestingKit/SenTestingKit.h>
 #import "MPMacPorts.h"
-#import "MPNotificationsListener.h"
+#import "MPNotifications.h"
 
 @interface MPMacPortsTest : SenTestCase {
 	MPMacPorts *testPort;
 	
 	//Create a Notifications Listener run tests then destroy it afterwards
-	MPNotificationsListener *testListener;
+	//MPNotifications *testListener;
 }
 
--(void) listenForPortSync;
--(void) actOnPortSync:(NSNotification *)notificiation;
+//-(void) listenForPortSync;
+//-(void) actOnPortSync:(NSNotification *)notificiation;
 -(void) testPortCreation;
 -(void) testPrefix;
 -(void) testSources;

Modified: branches/gsoc08-framework/MacPorts_Framework/MPMacPortsTest.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MPMacPortsTest.m	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MPMacPortsTest.m	2008-07-19 21:36:10 UTC (rev 38423)
@@ -39,13 +39,13 @@
 @implementation MPMacPortsTest
 - (void) setUp {
 	testPort = [MPMacPorts sharedInstance];
-	testListener = [[MPNotificationsListener alloc] init];
-	[self listenForPortSync];
+	//testListener = [[MPNotifications alloc] init];
+	//[self listenForPortSync];
 }
 
 - (void) tearDown {
 	[testPort release];
-	[testListener release];
+	//[testListener release];
 }
 
 
@@ -94,9 +94,7 @@
 	[testPort selfUpdate];
 	
 }
-*/
 
-
 -(void) listenForPortSync {
 	[[NSDistributedNotificationCenter defaultCenter] addObserver:self 
 														selector:@selector(actOnPortSync:) 
@@ -115,14 +113,14 @@
 	else
 		NSLog(@"MacPortsSyncFinished"); 
 }	
+*/
 
-
 -(void) testVersion {
 	NSString * version = [testPort version];
 	STAssertNotNil(version, @"%@ should not be nil", version);
 }
-
-/*-(void) testInstall {
+/*
+-(void) testInstall {
 	NSDictionary * result = [testPort search:@"pyt"];
 	STAssertNotNil(result, @"Search dictionary should not be null");
 	NSArray * aKeys = [result allKeys];

Added: branches/gsoc08-framework/MacPorts_Framework/MPNotifications.h
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MPNotifications.h	                        (rev 0)
+++ branches/gsoc08-framework/MacPorts_Framework/MPNotifications.h	2008-07-19 21:36:10 UTC (rev 38423)
@@ -0,0 +1,65 @@
+/*
+ *	$Id$
+ *	MacPorts.Framework
+ *
+ *	Authors:
+ *	George Armah <armahg at macports.org>
+ *
+ *	Copyright (c) 2008 George Armah <armahg at macports.org>
+ *	All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without
+ *	modification, are permitted provided that the following conditions
+ *	are met:
+ *	1.	Redistributions of source code must retain the above copyright
+ *		notice, this list of conditions and the following disclaimer.
+ *	2.	Redistributions in binary form must reproduce the above copyright
+ *		notice, this list of conditions and the following disclaimer in the
+ *		documentation and/or other materials provided with the distribution.
+ *	3.	Neither the name of the copyright owner nor the names of contributors
+ *		may be used to endorse or promote products derived from this software
+ *		without specific prior written permission.
+ * 
+ *	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *	AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ *	IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ *	ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ *	LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *	CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ *	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ *	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ *	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *	POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+#define MPMSG @"MPMsgNotification"
+#define MPINFO @"MPInfoNotification"
+#define MPWARN @"MPWarnNotification"
+#define MPERROR @"MPErrorNotification"
+#define MPDEBUG @"MPDebugNotification"
+#define MPALL @"MPAllNotification"
+
+
+/*This class's main purpose is to test the implementation of
+ NSNotifications from within the MacPorts Tcl API
+ */
+
+ at interface MPNotifications : NSObject {
+	NSString * performingTclCommand;
+	NSMutableDictionary * blockOptions;
+}
++ (MPNotifications *)sharedListener;
+
+-(BOOL)checkIfNotificationBlocked:(NSString *)option;
+-(void)blockNotification:(NSString *)option;
+-(void)unblockNotification:(NSString *)option;
+
+
+-(void)setPerformingTclCommand:(NSString *)string;
+-(NSString *)performingTclCommand;
+
+
+ at end


Property changes on: branches/gsoc08-framework/MacPorts_Framework/MPNotifications.h
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/gsoc08-framework/MacPorts_Framework/MPNotifications.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MPNotifications.m	                        (rev 0)
+++ branches/gsoc08-framework/MacPorts_Framework/MPNotifications.m	2008-07-19 21:36:10 UTC (rev 38423)
@@ -0,0 +1,142 @@
+/*
+ *	$Id$
+ *	MacPorts.Framework
+ *
+ *	Authors:
+ *	George Armah <armahg at macports.org>
+ *
+ *	Copyright (c) 2008 George Armah <armahg at macports.org>
+ *	All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without
+ *	modification, are permitted provided that the following conditions
+ *	are met:
+ *	1.	Redistributions of source code must retain the above copyright
+ *		notice, this list of conditions and the following disclaimer.
+ *	2.	Redistributions in binary form must reproduce the above copyright
+ *		notice, this list of conditions and the following disclaimer in the
+ *		documentation and/or other materials provided with the distribution.
+ *	3.	Neither the name of the copyright owner nor the names of contributors
+ *		may be used to endorse or promote products derived from this software
+ *		without specific prior written permission.
+ * 
+ *	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *	AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ *	IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ *	ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ *	LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *	CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ *	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ *	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ *	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *	POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#import "MPNotifications.h"
+
+
+ at implementation MPNotifications
+
+static MPNotifications *sharedMPListener = nil;
+
+
+
++ (MPNotifications *)sharedListener {
+	@synchronized(self) {
+		if (sharedMPListener == nil) {
+			[[self alloc] init];
+		}
+	}
+	return sharedMPListener;
+}
+
++ (id)allocWithZone:(NSZone *)zone {
+	@synchronized(self) {
+		if (sharedMPListener == nil) {
+			sharedMPListener = [super allocWithZone:zone];
+			return sharedMPListener;
+		}
+	}
+	return nil;
+}
+
+- (id)copyWithZone:(NSZone *)zone {
+	return self;
+}
+
+- (id)retain {
+	return self;
+}
+
+- (unsigned)retainCount {
+	return UINT_MAX;
+}
+
+-(void) release {
+	//do nothing
+}
+
+- (id) autorelease {
+	return self;
+}
+
+- (id)init {
+	if (self = [super init]) {
+		performingTclCommand = @"";
+		blockOptions = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
+						[NSNumber numberWithInt:0], MPMSG, [NSNumber numberWithInt:0], MPINFO, 
+						[NSNumber numberWithInt:0], MPWARN, [NSNumber numberWithInt:0], MPERROR, 
+						[NSNumber numberWithInt:1], MPDEBUG, [NSNumber numberWithInt:0], MPALL, nil];
+		NSLog(@"Dictionary is %@ ", [blockOptions description]);
+	}
+	return self;
+}
+
+- (void)dealloc {
+	[super dealloc];
+}
+
+
+- (void) setPerformingTclCommand:(NSString *)tclString {
+	
+	if(performingTclCommand != tclString){
+		[performingTclCommand release];
+		performingTclCommand = [tclString copy];
+	}
+	
+	//[[NSNotificationCenter defaultCenter] postNotificationName:@"testMacPortsNotification" 
+	//												   object:self];
+}
+
+- (NSString *) performingTclCommand {
+	return performingTclCommand;
+}
+
+//Should I raise an exception for invalid blockOptions that are
+//passed to this method?
+-(BOOL)checkIfNotificationBlocked:(NSString *)option {
+	if ( [[blockOptions objectForKey:option] intValue] == 1 ) {
+		return YES;
+	}
+	return NO;
+}
+
+-(void)blockNotification:(NSString *)option {
+	//Should do some checking first
+	if ( ! [self checkIfNotificationBlocked:option] ){
+		[blockOptions setObject:[NSNumber numberWithInt:1] 
+						 forKey:option];
+	}	
+}
+
+-(void)unblockNotification:(NSString *)option {
+	if ( [self checkIfNotificationBlocked:option] ) {
+		[blockOptions setObject:[NSNumber numberWithInt:0] 
+						 forKey:option];
+	}
+}
+
+
+ at end


Property changes on: branches/gsoc08-framework/MacPorts_Framework/MPNotifications.m
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Deleted: branches/gsoc08-framework/MacPorts_Framework/MPNotificationsListener.h
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MPNotificationsListener.h	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MPNotificationsListener.h	2008-07-19 21:36:10 UTC (rev 38423)
@@ -1,62 +0,0 @@
-/*
- *	$Id$
- *	MacPorts.Framework
- *
- *	Authors:
- *	George Armah <armahg at macports.org>
- *
- *	Copyright (c) 2008 George Armah <armahg at macports.org>
- *	All rights reserved.
- *
- *	Redistribution and use in source and binary forms, with or without
- *	modification, are permitted provided that the following conditions
- *	are met:
- *	1.	Redistributions of source code must retain the above copyright
- *		notice, this list of conditions and the following disclaimer.
- *	2.	Redistributions in binary form must reproduce the above copyright
- *		notice, this list of conditions and the following disclaimer in the
- *		documentation and/or other materials provided with the distribution.
- *	3.	Neither the name of the copyright owner nor the names of contributors
- *		may be used to endorse or promote products derived from this software
- *		without specific prior written permission.
- * 
- *	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *	AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *	IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *	ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- *	LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *	CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *	POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Cocoa/Cocoa.h>
-
-#define GLOBAL_MESSAGE @"Received global notification"
-#define LOCAL_MESSAGE @"Received local notification"
-
-/*This class's main purpose is to test the implementation of
- NSNotifications from within the MacPorts Tcl API
- */
-
- at interface MPNotificationsListener : NSObject {
-	
-}
-+ (MPNotificationsListener *)sharedListener;
-
-//Testing Key Value Compliance
--(void)setInfoString:(NSString *)string;
--(NSString *)infoString;
--(void)doLocalNotifications;
-
-/*/This same class will observe its infoString key value
-//- (void) observeInfoString;
--(void)registerForGlobalNotification;
--(void)registerForLocalNotification;
--(void)respondToGlobalNotification:(NSNotification*) notification;
--(void)respondToLocalNotification:(NSNotification *) notification;
-*/
- at end

Deleted: branches/gsoc08-framework/MacPorts_Framework/MPNotificationsListener.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MPNotificationsListener.m	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MPNotificationsListener.m	2008-07-19 21:36:10 UTC (rev 38423)
@@ -1,174 +0,0 @@
-/*
- *	$Id$
- *	MacPorts.Framework
- *
- *	Authors:
- *	George Armah <armahg at macports.org>
- *
- *	Copyright (c) 2008 George Armah <armahg at macports.org>
- *	All rights reserved.
- *
- *	Redistribution and use in source and binary forms, with or without
- *	modification, are permitted provided that the following conditions
- *	are met:
- *	1.	Redistributions of source code must retain the above copyright
- *		notice, this list of conditions and the following disclaimer.
- *	2.	Redistributions in binary form must reproduce the above copyright
- *		notice, this list of conditions and the following disclaimer in the
- *		documentation and/or other materials provided with the distribution.
- *	3.	Neither the name of the copyright owner nor the names of contributors
- *		may be used to endorse or promote products derived from this software
- *		without specific prior written permission.
- * 
- *	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *	AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *	IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *	ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- *	LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *	CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *	POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#import "MPNotificationsListener.h"
-
-
- at implementation MPNotificationsListener
-
-static MPNotificationsListener *sharedMPListener = nil;
-static NSString *infoString;
-
-+ (MPNotificationsListener *)sharedListener {
-	@synchronized(self) {
-		if (sharedMPListener == nil) {
-			[[self alloc] init];
-		}
-	}
-	return sharedMPListener;
-}
-
-+ (id)allocWithZone:(NSZone *)zone {
-	@synchronized(self) {
-		if (sharedMPListener == nil) {
-			sharedMPListener = [super allocWithZone:zone];
-			return sharedMPListener;
-		}
-	}
-	return nil;
-}
-
-- (id)copyWithZone:(NSZone *)zone {
-	return self;
-}
-
-- (id)retain {
-	return self;
-}
-
-- (unsigned)retainCount {
-	return UINT_MAX;
-}
-
--(void) release {
-	//do nothing
-}
-
-- (id) autorelease {
-	return self;
-}
-
-- (id)init {
-	if (self = [super init]) {
-		//[self registerForLocalNotification];
-		//[self registerForGlobalNotification];
-		//[self observeInfoString];
-	}
-	return self;
-}
-
-- (void)dealloc {
-	[super dealloc];
-}
-
-- (void) setInfoString:(NSString *) string {
-	infoString = [NSString stringWithString:string];
-	
-	[[NSNotificationCenter defaultCenter] postNotificationName:@"testMacPortsNotification" 
-													   object:self];
-	//NSLog(@"infoString has been set to %@", infoString);
-}
-
-- (NSString *) infoString {
-	return infoString;
-}
-
-- (void) doLocalNotifications {
-	
-}
-
-/*
--(void) observeInfoString {
-	[self addObserver:self 
-		   forKeyPath:@"infoString" 
-			  options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) 
-			  context:NULL];
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath 
-					  ofObject:(id)object 
-						change:(NSDictionary *)change 
-					   context:(void *)context {
-	
-	if ([keyPath isEqual:@"infoString"]) {
-			NSLog(@"InfoString changed from \n \
-				  %@ \n \
-				  to \n \
-				  %@ ", [change objectForKey:NSKeyValueChangeOldKey] ,
-				  [change objectForKey:NSKeyValueChangeNewKey]);
-	}
-	else 
-		NSLog (@"HOW DID INFOSTRING CHANGE WITHOUT CHANGING AN INFOSTRING?!");
-	
-	//There's no super implementation AFAIK
-}
-
-
--(void) registerForLocalNotification {
-	[[NSNotificationCenter defaultCenter] addObserver:self
-											 selector:@selector(respondToLocalNotification:) 
-												 name:@"testMacPortsNotification"
-											   object:nil];
-}
-
--(void) registerForGlobalNotification {
-	[[NSDistributedNotificationCenter defaultCenter] addObserver:self 
-														selector:@selector(respondToGlobalNotification:) 
-															name:@"testMacPortsNotification" 
-														  object:nil];
-}
-
--(void) respondToLocalNotification:(NSNotification *)notification {
-	id sentObject = [notification object];
-	
-	//Just NSLog it for now
-	if(sentObject == nil)
-		NSLog(@"%@", LOCAL_MESSAGE);
-	else
-		NSLog(@"%@" , NSStringFromClass([sentObject class]));
-}
-
--(void) respondToGlobalNotification:(NSNotification *)notification {
-	id sentObject = [notification object];
-	
-	//Just NSLog it for now
-	if(sentObject == nil)
-		NSLog(@"%@", GLOBAL_MESSAGE);
-	else
-		NSLog(@"%@", NSStringFromClass([sentObject class]));
-}
-*/
- at end

Modified: branches/gsoc08-framework/MacPorts_Framework/MPPort.h
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MPPort.h	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MPPort.h	2008-07-19 21:36:10 UTC (rev 38423)
@@ -43,6 +43,7 @@
 #import "MPMutableDictionary.h"
 #import "MPReceipt.h"
 #import "MPRegistry.h"
+#import "MPNotifications.h"
 
 
 
@@ -142,12 +143,6 @@
 - (void)deactivateWithOptions:(NSArray *)options withVersion:(NSString *)version;
 
 
-/*
- MAYBE WE SHOULD MAKE THIS METHOD PRIVATE AND USE IT AS THE DEFAULT 
- IMPLEMENTATION OF PUBLIC METHOD BELOW ??
-- (void)exec:(NSString *)target;
- */
-
 /*!
  @brief Executes the specified target for this MPPort
  @param target NSString target to be executed for this MPPort

Modified: branches/gsoc08-framework/MacPorts_Framework/MPPort.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MPPort.m	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MPPort.m	2008-07-19 21:36:10 UTC (rev 38423)
@@ -143,22 +143,16 @@
 }
 
 
-/*
- TO DO : Delete this method when scrubbing code
- 
-- (void)exec:(NSString *)target {
-	MPInterpreter *interpreter;
-	interpreter = [MPInterpreter sharedInterpreter];
-	[interpreter evaluateArrayAsString:[NSArray arrayWithObjects:
-		@"set portHandle [mportopen ",
-		[self valueForKey:@"portURL"],
-		@"]; mportexec portHandle",
-		target,
-		@";",
-		@"mportclose portHandle",
-		nil]];
+-(void)sendGlobalExecNotification:(NSString *)target withStatus:(NSString *)status {
+	NSString * notificationName = [NSString stringWithString:@"MacPorts"];
+	notificationName = [notificationName stringByAppendingString:target];
+	notificationName = [notificationName stringByAppendingString:status];
+	
+	//Should I be sending self as the object? Or should I send a newly created
+	//copy? What if the listener modifies this object? 
+	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:notificationName 
+																   object:self]; 
 }
-*/
 
 
 
@@ -206,10 +200,18 @@
 	if (options != NULL) 
 		opts = [NSString stringWithString:[options componentsJoinedByString:@" "]];	
 	
+	//Send Global Notifications and update MPNotifications variable
+	[self sendGlobalExecNotification:procedure withStatus:@"Started"];
+	NSString * tclCmd = [@"YES_" stringByAppendingString:procedure];
+	[[MPNotifications sharedListener] setPerformingTclCommand:tclCmd];
+	
 	[interpreter evaluateStringAsString:
 	 [NSString stringWithFormat:
 	  @"[%@ %@ %@ %@]" ,
 	  procedure, [self name], v, opts]];
+	
+	[[MPNotifications sharedListener] setPerformingTclCommand:@""];
+	[self sendGlobalExecNotification:procedure withStatus:@"Finished"];
 }
 
 //Used for the rest of other exec procedures
@@ -228,6 +230,11 @@
 		vrnts = [NSString stringWithString:[variants componentsJoinedByString:@" "]];
 	}
 	
+	//Send Global Notifications and update MPNotifications variable
+	[self sendGlobalExecNotification:target withStatus:@"Started"];
+	NSString * tclCmd = [@"YES_" stringByAppendingString:target];
+	[[MPNotifications sharedListener] setPerformingTclCommand:tclCmd];
+	
 	[interpreter evaluateStringAsString:
 	 [NSString stringWithFormat:
 	  @"set portHandle [mportopen  %@  %@  %@]; \
@@ -235,102 +242,78 @@
 	  mportclose portHandle", 
 	  [self valueForKey:@"portURL"], opts, vrnts, target]];
 	
-}
-
--(void)sendGlobalExecNotification:(NSString *)target withStatus:(NSString *)status {
-	NSString * notificationName = [NSString stringWithString:@"MacPorts"];
-	notificationName = [notificationName stringByAppendingString:target];
-	notificationName = [notificationName stringByAppendingString:status];
+	[[MPNotifications sharedListener] setPerformingTclCommand:@""];
+	[self sendGlobalExecNotification:target withStatus:@"Finished"];
 	
-	//Should I be sending self as the object? Or should I send a newly created
-	//copy? What if the listener modifies this object? 
-	[[NSDistributedNotificationCenter defaultCenter] postNotificationName:notificationName 
-																   object:self]; 
 }
 
 
 
+
 #pragma mark -
 # pragma mark Exec methods 
 - (void)uninstallWithOptions:(NSArray *)options withVersion:(NSString *)version {
-	
-	[self sendGlobalExecNotification:@"Uninstall" withStatus:@"Started"];
 	[self execPortProc:@"mportuninstall" withOptions:options withVersion:version];
-	[self sendGlobalExecNotification:@"Uninstall" withStatus:@"Finished"];
 }
 
 - (void)activateWithOptions:(NSArray *)options withVersion:(NSString *)version {
-	[self sendGlobalExecNotification:@"Activate" withStatus:@"Started"];
 	[self execPortProc:@"mportactivate" withOptions:options withVersion:version];
-	[self sendGlobalExecNotification:@"Activate" withStatus:@"Finished"];
 }
 
 - (void)deactivateWithOptions:(NSArray *)options withVersion:(NSString *)version {
-	[self sendGlobalExecNotification:@"Deactivate" withStatus:@"Started"];
 	[self execPortProc:@"mportdeactivate" withOptions:options withVersion:version];
-	[self sendGlobalExecNotification:@"Deactivate" withStatus:@"Finished"];
 }
 
 -(void)configureWithOptions:(NSArray *)options withVariants:(NSArray *)variants{
-	[self sendGlobalExecNotification:@"Configure" withStatus:@"Started"];
 	[self exec:@"configure" withOptions:options withVariants:variants];
 }
+
 -(void)buildWithOptions:(NSArray *)options withVariants:(NSArray *)variants {
-	[self sendGlobalExecNotification:@"Build" withStatus:@"Started"];
 	[self exec:@"build" withOptions:options withVariants:variants];
 }
+
 -(void)testWithOptions:(NSArray *)options withVariants:(NSArray *)variants {
-	[self sendGlobalExecNotification:@"Test" withStatus:@"Started"];
 	[self exec:@"test" withOptions:options withVariants:variants];	
 }
+
 -(void)destrootWithOptions:(NSArray *)options withVariants:(NSArray *)variants {
-	[self sendGlobalExecNotification:@"Destroot" withStatus:@"Started"];
 	[self exec:@"destroot" withOptions:options withVariants:variants];
 }
+
 -(void)installWithOptions:(NSArray *)options withVariants:(NSArray *)variants {
-	[self sendGlobalExecNotification:@"Install" withStatus:@"Started"];
 	[self exec:@"install" withOptions:options withVariants:variants];
-	[self sendGlobalExecNotification:@"Install" withStatus:@"Finished"];
 }
+
 -(void)archiveWithOptions:(NSArray *)options withVariants:(NSArray *)variants {
-	[self sendGlobalExecNotification:@"Archive" withStatus:@"Started"];
 	[self exec:@"archive" withOptions:options withVariants:variants];
-	[self sendGlobalExecNotification:@"Archive" withStatus:@"Finished"];
 }
+
 -(void)createDmgWithOptions:(NSArray *)options withVariants:(NSArray *)variants {
-	[self sendGlobalExecNotification:@"Dmg" withStatus:@"Started"];
 	[self exec:@"dmg" withOptions:options withVariants:variants];
-	[self sendGlobalExecNotification:@"Dmg" withStatus:@"Finished"];
 }
+
 -(void)createMdmgWithOptions:(NSArray *)options withVariants:(NSArray *)variants {
-	[self sendGlobalExecNotification:@"Mdmg" withStatus:@"Started"];
 	[self exec:@"mdmg" withOptions:options withVariants:variants];
-	[self sendGlobalExecNotification:@"Mdmg" withStatus:@"Finished"];
 }
+
 -(void)createPkgWithOptions:(NSArray *)options withVariants:(NSArray *)variants {
-	[self sendGlobalExecNotification:@"Pkg" withStatus:@"Started"];
 	[self exec:@"pkg" withOptions:options withVariants:variants];
-	[self sendGlobalExecNotification:@"Pkg" withStatus:@"Finished"];
 }
+
 -(void)createMpkgWithOptions:(NSArray *)options withVariants:(NSArray *)variants {
-	[self sendGlobalExecNotification:@"Mpkg" withStatus:@"Started"];
 	[self exec:@"mpkg" withOptions:options withVariants:variants];
-	[self sendGlobalExecNotification:@"Mpkg" withStatus:@"Finished"];
 }
+
 -(void)createRpmWithOptions:(NSArray *)options withVariants:(NSArray *)variants {
-	[self sendGlobalExecNotification:@"Rpm" withStatus:@"Started"];
 	[self exec:@"rpm" withOptions:options withVariants:variants];
-	[self sendGlobalExecNotification:@"Rpm" withStatus:@"Finished"];
 }
+
 -(void)createDpkgWithOptions:(NSArray *)options withVariants:(NSArray *)variants {
-	[self sendGlobalExecNotification:@"Dpkg" withStatus:@"Started"];
 	[self exec:@"dpkg" withOptions:options withVariants:variants];
-	[self sendGlobalExecNotification:@"Dpkg" withStatus:@"Finished"];
 }
+
 -(void)createSrpmWithOptions:(NSArray *)options withVariants:(NSArray *)variants {
-	[self sendGlobalExecNotification:@"Srpm" withStatus:@"Started"];
 	[self exec:@"srpm" withOptions:options withVariants:variants];
-	[self sendGlobalExecNotification:@"Srpm" withStatus:@"Finished"];
 }
 
 # pragma mark -

Modified: branches/gsoc08-framework/MacPorts_Framework/MacPorts.Framework.xcodeproj/Armahg.mode1v3
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MacPorts.Framework.xcodeproj/Armahg.mode1v3	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MacPorts.Framework.xcodeproj/Armahg.mode1v3	2008-07-19 21:36:10 UTC (rev 38423)
@@ -202,24 +202,24 @@
 			<key>Content</key>
 			<dict>
 				<key>PBXProjectModuleGUID</key>
-				<string>6E44A0040E2DAC0D007DE8EC</string>
+				<string>6E7DBED30E3246530056CCBD</string>
 				<key>PBXProjectModuleLabel</key>
-				<string>MPMacPorts.m</string>
+				<string>MPPort.m</string>
 				<key>PBXSplitModuleInNavigatorKey</key>
 				<dict>
 					<key>Split0</key>
 					<dict>
 						<key>PBXProjectModuleGUID</key>
-						<string>6E44A0050E2DAC0D007DE8EC</string>
+						<string>6E7DBED40E3246530056CCBD</string>
 						<key>PBXProjectModuleLabel</key>
-						<string>MPMacPorts.m</string>
+						<string>MPPort.m</string>
 						<key>_historyCapacity</key>
 						<integer>0</integer>
 						<key>bookmark</key>
-						<string>6E44A02A0E2DB6C0007DE8EC</string>
+						<string>6E7DBF560E3290D60056CCBD</string>
 						<key>history</key>
 						<array>
-							<string>6E449FE20E2D9CD8007DE8EC</string>
+							<string>6E7DBEBC0E323CFF0056CCBD</string>
 						</array>
 					</dict>
 					<key>SplitCount</key>
@@ -231,11 +231,11 @@
 			<key>Geometry</key>
 			<dict>
 				<key>Frame</key>
-				<string>{{0, 20}, {865, 681}}</string>
+				<string>{{0, 20}, {853, 532}}</string>
 				<key>PBXModuleWindowStatusBarHidden2</key>
 				<false/>
 				<key>RubberWindowFrame</key>
-				<string>57 56 865 722 0 0 1152 778 </string>
+				<string>260 201 853 573 0 0 1152 778 </string>
 			</dict>
 		</dict>
 	</array>
@@ -275,8 +275,6 @@
 			<key>Layout</key>
 			<array>
 				<dict>
-					<key>BecomeActive</key>
-					<true/>
 					<key>ContentConfiguration</key>
 					<dict>
 						<key>PBXBottomSmartGroupGIDs</key>
@@ -301,7 +299,7 @@
 						<dict>
 							<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
 							<array>
-								<real>276</real>
+								<real>231</real>
 							</array>
 							<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
 							<array>
@@ -314,6 +312,7 @@
 							<array>
 								<string>0867D691FE84028FC02AAC07</string>
 								<string>6EA293540E05C8C600902D12</string>
+								<string>6E88D1760DF46A2600684E9F</string>
 								<string>08FB77AEFE84172EC02AAC07</string>
 								<string>089C1665FE841158C02AAC07</string>
 								<string>4822AAD40D7EB39200C4D4D7</string>
@@ -324,13 +323,13 @@
 							<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
 							<array>
 								<array>
-									<integer>25</integer>
-									<integer>24</integer>
+									<integer>16</integer>
+									<integer>12</integer>
 									<integer>0</integer>
 								</array>
 							</array>
 							<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
-							<string>{{0, 261}, {276, 565}}</string>
+							<string>{{0, 0}, {231, 453}}</string>
 						</dict>
 						<key>PBXTopSmartGroupGIDs</key>
 						<array/>
@@ -342,30 +341,32 @@
 					<key>GeometryConfiguration</key>
 					<dict>
 						<key>Frame</key>
-						<string>{{0, 0}, {293, 583}}</string>
+						<string>{{0, 0}, {248, 471}}</string>
 						<key>GroupTreeTableConfiguration</key>
 						<array>
 							<string>MainColumn</string>
-							<real>276</real>
+							<real>231</real>
 						</array>
 						<key>RubberWindowFrame</key>
-						<string>76 151 1013 624 0 0 1152 778 </string>
+						<string>36 261 1004 512 0 0 1152 778 </string>
 					</dict>
 					<key>Module</key>
 					<string>PBXSmartGroupTreeModule</string>
 					<key>Proportion</key>
-					<string>293pt</string>
+					<string>248pt</string>
 				</dict>
 				<dict>
 					<key>Dock</key>
 					<array>
 						<dict>
+							<key>BecomeActive</key>
+							<true/>
 							<key>ContentConfiguration</key>
 							<dict>
 								<key>PBXProjectModuleGUID</key>
 								<string>1CE0B20306471E060097A5F4</string>
 								<key>PBXProjectModuleLabel</key>
-								<string>init.tcl</string>
+								<string>MPInterpreter.m</string>
 								<key>PBXSplitModuleInNavigatorKey</key>
 								<dict>
 									<key>Split0</key>
@@ -373,43 +374,43 @@
 										<key>PBXProjectModuleGUID</key>
 										<string>1CE0B20406471E060097A5F4</string>
 										<key>PBXProjectModuleLabel</key>
-										<string>init.tcl</string>
+										<string>MPInterpreter.m</string>
 										<key>_historyCapacity</key>
 										<integer>0</integer>
 										<key>bookmark</key>
-										<string>6E44A0290E2DB6C0007DE8EC</string>
+										<string>6E7DBF550E3290D60056CCBD</string>
 										<key>history</key>
 										<array>
 											<string>6E1AE7F20E22E34900F6D7BC</string>
 											<string>6EF2D9CB0E254F6900D896EC</string>
 											<string>6EF2DA130E25763E00D896EC</string>
 											<string>6EF2DAC00E26BBD500D896EC</string>
-											<string>6EF2DAEC0E2809E400D896EC</string>
-											<string>6EF2DAEF0E2809E400D896EC</string>
 											<string>6EF2DB550E290E2C00D896EC</string>
-											<string>6EF2DBF50E29439200D896EC</string>
 											<string>6EEB11E70E2A945400BFEC81</string>
-											<string>6EEB12B70E2BF43E00BFEC81</string>
-											<string>6EEB12B80E2BF43E00BFEC81</string>
-											<string>6EEB12B90E2BF43E00BFEC81</string>
 											<string>6EEB13780E2C336000BFEC81</string>
 											<string>6EEB14300E2CAF3600BFEC81</string>
-											<string>6EEB14310E2CAF3600BFEC81</string>
-											<string>6EEB14320E2CAF3600BFEC81</string>
 											<string>6EEB14340E2CAF3600BFEC81</string>
-											<string>6EEB14350E2CAF3600BFEC81</string>
-											<string>6E27952A0E2D830600A52316</string>
-											<string>6E449FF30E2DAC0D007DE8EC</string>
-											<string>6E449FF60E2DAC0D007DE8EC</string>
 											<string>6E449FF70E2DAC0D007DE8EC</string>
-											<string>6E44A0140E2DB6C0007DE8EC</string>
-											<string>6E44A0150E2DB6C0007DE8EC</string>
-											<string>6E44A0160E2DB6C0007DE8EC</string>
-											<string>6E44A0170E2DB6C0007DE8EC</string>
-											<string>6E44A0180E2DB6C0007DE8EC</string>
-											<string>6E44A0190E2DB6C0007DE8EC</string>
 											<string>6E44A01A0E2DB6C0007DE8EC</string>
-											<string>6E44A01B0E2DB6C0007DE8EC</string>
+											<string>6E44A04D0E2E80A9007DE8EC</string>
+											<string>6E44A04E0E2E80A9007DE8EC</string>
+											<string>6E44A0920E2F3842007DE8EC</string>
+											<string>6E49B3CF0E30857700CF6B97</string>
+											<string>6E49B42D0E30EEF900CF6B97</string>
+											<string>6E49B42E0E30EEF900CF6B97</string>
+											<string>6E49B42F0E30EEF900CF6B97</string>
+											<string>6EE7EC520E31382400D3ABC9</string>
+											<string>6E7DBEC40E3246530056CCBD</string>
+											<string>6E7DBEDD0E324DF60056CCBD</string>
+											<string>6E7DBEDE0E324DF60056CCBD</string>
+											<string>6E7DBEDF0E324DF60056CCBD</string>
+											<string>6E7DBEF80E3278C70056CCBD</string>
+											<string>6E7DBEF90E3278C70056CCBD</string>
+											<string>6E7DBF460E3290D60056CCBD</string>
+											<string>6E7DBF470E3290D60056CCBD</string>
+											<string>6E7DBF480E3290D60056CCBD</string>
+											<string>6E7DBF490E3290D60056CCBD</string>
+											<string>6E7DBF4A0E3290D60056CCBD</string>
 										</array>
 										<key>prevStack</key>
 										<array>
@@ -439,31 +440,48 @@
 											<string>6EF2DC890E294CE900D896EC</string>
 											<string>6EEB11EC0E2A945400BFEC81</string>
 											<string>6EEB12C90E2BF43E00BFEC81</string>
-											<string>6EEB12D00E2BF43E00BFEC81</string>
 											<string>6EEB130A0E2BFA7900BFEC81</string>
 											<string>6EEB132A0E2C021C00BFEC81</string>
-											<string>6E449FFA0E2DAC0D007DE8EC</string>
-											<string>6E449FFB0E2DAC0D007DE8EC</string>
-											<string>6E449FFC0E2DAC0D007DE8EC</string>
-											<string>6E449FFD0E2DAC0D007DE8EC</string>
-											<string>6E449FFE0E2DAC0D007DE8EC</string>
-											<string>6E449FFF0E2DAC0D007DE8EC</string>
-											<string>6E44A0000E2DAC0D007DE8EC</string>
-											<string>6E44A0010E2DAC0D007DE8EC</string>
-											<string>6E44A0020E2DAC0D007DE8EC</string>
-											<string>6E44A01C0E2DB6C0007DE8EC</string>
-											<string>6E44A01D0E2DB6C0007DE8EC</string>
 											<string>6E44A01E0E2DB6C0007DE8EC</string>
-											<string>6E44A01F0E2DB6C0007DE8EC</string>
-											<string>6E44A0200E2DB6C0007DE8EC</string>
-											<string>6E44A0210E2DB6C0007DE8EC</string>
-											<string>6E44A0220E2DB6C0007DE8EC</string>
-											<string>6E44A0230E2DB6C0007DE8EC</string>
-											<string>6E44A0240E2DB6C0007DE8EC</string>
-											<string>6E44A0250E2DB6C0007DE8EC</string>
-											<string>6E44A0260E2DB6C0007DE8EC</string>
-											<string>6E44A0270E2DB6C0007DE8EC</string>
-											<string>6E44A0280E2DB6C0007DE8EC</string>
+											<string>6E7DBEC90E3246530056CCBD</string>
+											<string>6E7DBECB0E3246530056CCBD</string>
+											<string>6E7DBECC0E3246530056CCBD</string>
+											<string>6E7DBECD0E3246530056CCBD</string>
+											<string>6E7DBECE0E3246530056CCBD</string>
+											<string>6E7DBECF0E3246530056CCBD</string>
+											<string>6E7DBED00E3246530056CCBD</string>
+											<string>6E7DBED10E3246530056CCBD</string>
+											<string>6E7DBED80E324C800056CCBD</string>
+											<string>6E7DBED90E324C800056CCBD</string>
+											<string>6E7DBEDA0E324C800056CCBD</string>
+											<string>6E7DBEE10E324DF60056CCBD</string>
+											<string>6E7DBEE20E324DF60056CCBD</string>
+											<string>6E7DBEE30E324DF60056CCBD</string>
+											<string>6E7DBEE40E324DF60056CCBD</string>
+											<string>6E7DBEE50E324DF60056CCBD</string>
+											<string>6E7DBEE60E324DF60056CCBD</string>
+											<string>6E7DBEFC0E3278C70056CCBD</string>
+											<string>6E7DBEFD0E3278C70056CCBD</string>
+											<string>6E7DBEFF0E3278C70056CCBD</string>
+											<string>6E7DBF010E3278C70056CCBD</string>
+											<string>6E7DBF2D0E32897B0056CCBD</string>
+											<string>6E7DBF2E0E32897B0056CCBD</string>
+											<string>6E7DBF2F0E32897B0056CCBD</string>
+											<string>6E7DBF300E32897B0056CCBD</string>
+											<string>6E7DBF370E328B8B0056CCBD</string>
+											<string>6E7DBF380E328B8B0056CCBD</string>
+											<string>6E7DBF390E328B8B0056CCBD</string>
+											<string>6E7DBF3A0E328B8B0056CCBD</string>
+											<string>6E7DBF4B0E3290D60056CCBD</string>
+											<string>6E7DBF4C0E3290D60056CCBD</string>
+											<string>6E7DBF4D0E3290D60056CCBD</string>
+											<string>6E7DBF4E0E3290D60056CCBD</string>
+											<string>6E7DBF4F0E3290D60056CCBD</string>
+											<string>6E7DBF500E3290D60056CCBD</string>
+											<string>6E7DBF510E3290D60056CCBD</string>
+											<string>6E7DBF520E3290D60056CCBD</string>
+											<string>6E7DBF530E3290D60056CCBD</string>
+											<string>6E7DBF540E3290D60056CCBD</string>
 										</array>
 									</dict>
 									<key>SplitCount</key>
@@ -475,14 +493,14 @@
 							<key>GeometryConfiguration</key>
 							<dict>
 								<key>Frame</key>
-								<string>{{0, 0}, {715, 372}}</string>
+								<string>{{0, 0}, {751, 411}}</string>
 								<key>RubberWindowFrame</key>
-								<string>76 151 1013 624 0 0 1152 778 </string>
+								<string>36 261 1004 512 0 0 1152 778 </string>
 							</dict>
 							<key>Module</key>
 							<string>PBXNavigatorGroup</string>
 							<key>Proportion</key>
-							<string>372pt</string>
+							<string>411pt</string>
 						</dict>
 						<dict>
 							<key>ContentConfiguration</key>
@@ -495,18 +513,18 @@
 							<key>GeometryConfiguration</key>
 							<dict>
 								<key>Frame</key>
-								<string>{{0, 377}, {715, 206}}</string>
+								<string>{{0, 416}, {751, 55}}</string>
 								<key>RubberWindowFrame</key>
-								<string>76 151 1013 624 0 0 1152 778 </string>
+								<string>36 261 1004 512 0 0 1152 778 </string>
 							</dict>
 							<key>Module</key>
 							<string>XCDetailModule</string>
 							<key>Proportion</key>
-							<string>206pt</string>
+							<string>55pt</string>
 						</dict>
 					</array>
 					<key>Proportion</key>
-					<string>715pt</string>
+					<string>751pt</string>
 				</dict>
 			</array>
 			<key>Name</key>
@@ -521,9 +539,9 @@
 			</array>
 			<key>TableOfContents</key>
 			<array>
-				<string>6E449FDA0E2D8FD0007DE8EC</string>
+				<string>6E7DBEB50E323A300056CCBD</string>
 				<string>1CE0B1FE06471DED0097A5F4</string>
-				<string>6E449FDB0E2D8FD0007DE8EC</string>
+				<string>6E7DBEB60E323A300056CCBD</string>
 				<string>1CE0B20306471E060097A5F4</string>
 				<string>1CE0B20506471E060097A5F4</string>
 			</array>
@@ -657,13 +675,12 @@
 	<integer>5</integer>
 	<key>WindowOrderList</key>
 	<array>
-		<string>1C530D57069F1CE1000CFCEE</string>
-		<string>6E44A0040E2DAC0D007DE8EC</string>
+		<string>6E7DBED30E3246530056CCBD</string>
 		<string>6E1AE7FA0E22E34900F6D7BC</string>
 		<string>/Users/Armahg/gsoc08/MacPorts_Framework/MacPorts.Framework.xcodeproj</string>
 	</array>
 	<key>WindowString</key>
-	<string>76 151 1013 624 0 0 1152 778 </string>
+	<string>36 261 1004 512 0 0 1152 778 </string>
 	<key>WindowToolsV3</key>
 	<array>
 		<dict>
@@ -691,14 +708,14 @@
 							<key>GeometryConfiguration</key>
 							<dict>
 								<key>Frame</key>
-								<string>{{0, 0}, {925, 198}}</string>
+								<string>{{0, 0}, {933, 131}}</string>
 								<key>RubberWindowFrame</key>
-								<string>324 151 925 597 0 0 1152 778 </string>
+								<string>644 161 933 559 0 0 1152 778 </string>
 							</dict>
 							<key>Module</key>
 							<string>PBXNavigatorGroup</string>
 							<key>Proportion</key>
-							<string>198pt</string>
+							<string>131pt</string>
 						</dict>
 						<dict>
 							<key>BecomeActive</key>
@@ -706,7 +723,7 @@
 							<key>ContentConfiguration</key>
 							<dict>
 								<key>PBXBuildLogShowsTranscriptDefaultKey</key>
-								<string>{{0, 198}, {925, 155}}</string>
+								<string>{{0, 250}, {933, 132}}</string>
 								<key>PBXProjectModuleGUID</key>
 								<string>XCMainBuildResultsModuleGUID</string>
 								<key>PBXProjectModuleLabel</key>
@@ -719,18 +736,18 @@
 							<key>GeometryConfiguration</key>
 							<dict>
 								<key>Frame</key>
-								<string>{{0, 203}, {925, 353}}</string>
+								<string>{{0, 136}, {933, 382}}</string>
 								<key>RubberWindowFrame</key>
-								<string>324 151 925 597 0 0 1152 778 </string>
+								<string>644 161 933 559 0 0 1152 778 </string>
 							</dict>
 							<key>Module</key>
 							<string>PBXBuildResultsModule</string>
 							<key>Proportion</key>
-							<string>353pt</string>
+							<string>382pt</string>
 						</dict>
 					</array>
 					<key>Proportion</key>
-					<string>556pt</string>
+					<string>518pt</string>
 				</dict>
 			</array>
 			<key>Name</key>
@@ -744,22 +761,26 @@
 			<key>TableOfContents</key>
 			<array>
 				<string>6E1AE7FA0E22E34900F6D7BC</string>
-				<string>6E449FDC0E2D8FD0007DE8EC</string>
+				<string>6E7DBEB70E323A300056CCBD</string>
 				<string>1CD0528F0623707200166675</string>
 				<string>XCMainBuildResultsModuleGUID</string>
 			</array>
 			<key>ToolbarConfiguration</key>
 			<string>xcode.toolbar.config.buildV3</string>
 			<key>WindowString</key>
-			<string>324 151 925 597 0 0 1152 778 </string>
+			<string>644 161 933 559 0 0 1152 778 </string>
 			<key>WindowToolGUID</key>
 			<string>6E1AE7FA0E22E34900F6D7BC</string>
 			<key>WindowToolIsVisible</key>
 			<true/>
 		</dict>
 		<dict>
+			<key>FirstTimeWindowDisplayed</key>
+			<false/>
 			<key>Identifier</key>
 			<string>windowTool.debugger</string>
+			<key>IsVertical</key>
+			<true/>
 			<key>Layout</key>
 			<array>
 				<dict>
@@ -782,8 +803,8 @@
 										<string>yes</string>
 										<key>sizes</key>
 										<array>
-											<string>{{0, 0}, {317, 164}}</string>
-											<string>{{317, 0}, {377, 164}}</string>
+											<string>{{0, 0}, {392, 152}}</string>
+											<string>{{392, 0}, {470, 152}}</string>
 										</array>
 									</dict>
 									<key>VerticalSplitView</key>
@@ -798,8 +819,8 @@
 										<string>yes</string>
 										<key>sizes</key>
 										<array>
-											<string>{{0, 0}, {694, 164}}</string>
-											<string>{{0, 164}, {694, 216}}</string>
+											<string>{{0, 0}, {862, 152}}</string>
+											<string>{{0, 152}, {862, 161}}</string>
 										</array>
 									</dict>
 								</dict>
@@ -812,8 +833,6 @@
 							</dict>
 							<key>GeometryConfiguration</key>
 							<dict>
-								<key>DebugConsoleDrawerSize</key>
-								<string>{100, 120}</string>
 								<key>DebugConsoleVisible</key>
 								<string>None</string>
 								<key>DebugConsoleWindowFrame</key>
@@ -821,18 +840,34 @@
 								<key>DebugSTDIOWindowFrame</key>
 								<string>{{200, 200}, {500, 300}}</string>
 								<key>Frame</key>
-								<string>{{0, 0}, {694, 380}}</string>
+								<string>{{0, 0}, {862, 313}}</string>
+								<key>PBXDebugSessionStackFrameViewKey</key>
+								<dict>
+									<key>DebugVariablesTableConfiguration</key>
+									<array>
+										<string>Name</string>
+										<real>120</real>
+										<string>Value</string>
+										<real>85</real>
+										<string>Summary</string>
+										<real>240</real>
+									</array>
+									<key>Frame</key>
+									<string>{{392, 0}, {470, 152}}</string>
+									<key>RubberWindowFrame</key>
+									<string>187 281 862 354 0 0 1152 778 </string>
+								</dict>
 								<key>RubberWindowFrame</key>
-								<string>321 238 694 422 0 0 1440 878 </string>
+								<string>187 281 862 354 0 0 1152 778 </string>
 							</dict>
 							<key>Module</key>
 							<string>PBXDebugSessionModule</string>
 							<key>Proportion</key>
-							<string>100%</string>
+							<string>313pt</string>
 						</dict>
 					</array>
 					<key>Proportion</key>
-					<string>100%</string>
+					<string>313pt</string>
 				</dict>
 			</array>
 			<key>Name</key>
@@ -842,22 +877,26 @@
 				<string>PBXDebugSessionModule</string>
 			</array>
 			<key>StatusbarIsVisible</key>
-			<integer>1</integer>
+			<true/>
 			<key>TableOfContents</key>
 			<array>
 				<string>1CD10A99069EF8BA00B06720</string>
-				<string>1C0AD2AB069F1E9B00FABCE6</string>
+				<string>6EE7EBDA0E31266F00D3ABC9</string>
 				<string>1C162984064C10D400B95A72</string>
-				<string>1C0AD2AC069F1E9B00FABCE6</string>
+				<string>6EE7EBDB0E31266F00D3ABC9</string>
+				<string>6EE7EBDC0E31266F00D3ABC9</string>
+				<string>6EE7EBDD0E31266F00D3ABC9</string>
+				<string>6EE7EBDE0E31266F00D3ABC9</string>
+				<string>6EE7EBDF0E31266F00D3ABC9</string>
 			</array>
 			<key>ToolbarConfiguration</key>
 			<string>xcode.toolbar.config.debugV3</string>
 			<key>WindowString</key>
-			<string>321 238 694 422 0 0 1440 878 </string>
+			<string>187 281 862 354 0 0 1152 778 </string>
 			<key>WindowToolGUID</key>
 			<string>1CD10A99069EF8BA00B06720</string>
 			<key>WindowToolIsVisible</key>
-			<integer>0</integer>
+			<false/>
 		</dict>
 		<dict>
 			<key>FirstTimeWindowDisplayed</key>
@@ -880,7 +919,7 @@
 										<key>PBXProjectModuleGUID</key>
 										<string>1CDD528C0622207200134675</string>
 										<key>PBXProjectModuleLabel</key>
-										<string>MPIndex.m</string>
+										<string>MPInterpreter.m</string>
 										<key>StatusBarVisibility</key>
 										<true/>
 									</dict>
@@ -889,7 +928,7 @@
 										<key>Frame</key>
 										<string>{{0, 0}, {878, 341}}</string>
 										<key>RubberWindowFrame</key>
-										<string>122 59 878 715 0 0 1152 778 </string>
+										<string>171 16 878 715 0 0 1152 778 </string>
 									</dict>
 									<key>Module</key>
 									<string>PBXNavigatorGroup</string>
@@ -915,7 +954,7 @@
 								<key>Frame</key>
 								<string>{{0, 346}, {878, 328}}</string>
 								<key>RubberWindowFrame</key>
-								<string>122 59 878 715 0 0 1152 778 </string>
+								<string>171 16 878 715 0 0 1152 778 </string>
 							</dict>
 							<key>Module</key>
 							<string>PBXProjectFindModule</string>
@@ -938,13 +977,13 @@
 			<key>TableOfContents</key>
 			<array>
 				<string>1C530D57069F1CE1000CFCEE</string>
-				<string>6E449FF10E2DABDB007DE8EC</string>
-				<string>6E449FF20E2DABDB007DE8EC</string>
+				<string>6EE7EBAD0E31211A00D3ABC9</string>
+				<string>6EE7EBAE0E31211A00D3ABC9</string>
 				<string>1CDD528C0622207200134675</string>
 				<string>1CD0528E0623707200166675</string>
 			</array>
 			<key>WindowString</key>
-			<string>122 59 878 715 0 0 1152 778 </string>
+			<string>171 16 878 715 0 0 1152 778 </string>
 			<key>WindowToolGUID</key>
 			<string>1C530D57069F1CE1000CFCEE</string>
 			<key>WindowToolIsVisible</key>
@@ -1004,7 +1043,7 @@
 			<key>TableOfContents</key>
 			<array>
 				<string>1C78EAAD065D492600B07095</string>
-				<string>6E1AE86A0E235E3400F6D7BC</string>
+				<string>6EE7EBE00E31266F00D3ABC9</string>
 				<string>1C78EAAC065D492600B07095</string>
 			</array>
 			<key>ToolbarConfiguration</key>
@@ -1456,33 +1495,44 @@
 			<integer>0</integer>
 		</dict>
 		<dict>
+			<key>FirstTimeWindowDisplayed</key>
+			<false/>
 			<key>Identifier</key>
 			<string>windowTool.refactoring</string>
 			<key>IncludeInToolsMenu</key>
 			<integer>0</integer>
+			<key>IsVertical</key>
+			<true/>
 			<key>Layout</key>
 			<array>
 				<dict>
 					<key>Dock</key>
 					<array>
 						<dict>
-							<key>BecomeActive</key>
-							<integer>1</integer>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>PBXProjectModuleGUID</key>
+								<string>6E49B4140E30EC7700CF6B97</string>
+							</dict>
 							<key>GeometryConfiguration</key>
 							<dict>
 								<key>Frame</key>
-								<string>{0, 0}, {500, 335}</string>
+								<string>{{0, 0}, {919, 668}}</string>
 								<key>RubberWindowFrame</key>
-								<string>{0, 0}, {500, 335}</string>
+								<string>156 37 919 709 0 0 1152 778 </string>
+								<key>XCRefactoringSplitViewLowerHeight</key>
+								<real>288</real>
+								<key>XCRefactoringSplitViewTotalHeight</key>
+								<real>585</real>
 							</dict>
 							<key>Module</key>
 							<string>XCRefactoringModule</string>
 							<key>Proportion</key>
-							<string>100%</string>
+							<string>668pt</string>
 						</dict>
 					</array>
 					<key>Proportion</key>
-					<string>100%</string>
+					<string>668pt</string>
 				</dict>
 			</array>
 			<key>Name</key>
@@ -1491,8 +1541,20 @@
 			<array>
 				<string>XCRefactoringModule</string>
 			</array>
+			<key>StatusbarIsVisible</key>
+			<true/>
+			<key>TableOfContents</key>
+			<array>
+				<string>6E49B4150E30EC7700CF6B97</string>
+				<string>6E49B4160E30EC7700CF6B97</string>
+				<string>6E49B4140E30EC7700CF6B97</string>
+			</array>
 			<key>WindowString</key>
-			<string>200 200 500 356 0 0 1920 1200 </string>
+			<string>156 37 919 709 0 0 1152 778 </string>
+			<key>WindowToolGUID</key>
+			<string>6E49B4150E30EC7700CF6B97</string>
+			<key>WindowToolIsVisible</key>
+			<false/>
 		</dict>
 	</array>
 </dict>

Modified: branches/gsoc08-framework/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj	2008-07-19 21:36:10 UTC (rev 38423)
@@ -38,8 +38,8 @@
 		48E993940C82CAAE00219DDF /* MPMacPorts.h in Headers */ = {isa = PBXBuildFile; fileRef = 48E993920C82CAAE00219DDF /* MPMacPorts.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		48E993950C82CAAE00219DDF /* MPMacPorts.m in Sources */ = {isa = PBXBuildFile; fileRef = 48E993930C82CAAE00219DDF /* MPMacPorts.m */; };
 		48E9939F0C82CEB000219DDF /* init.tcl in Resources */ = {isa = PBXBuildFile; fileRef = 48E9939E0C82CEB000219DDF /* init.tcl */; };
-		6E270D090E158CED00BAE687 /* MPNotificationsListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E270D070E158CED00BAE687 /* MPNotificationsListener.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		6E270D0A0E158CED00BAE687 /* MPNotificationsListener.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E270D080E158CED00BAE687 /* MPNotificationsListener.m */; };
+		6E270D090E158CED00BAE687 /* MPNotifications.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E270D070E158CED00BAE687 /* MPNotifications.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		6E270D0A0E158CED00BAE687 /* MPNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E270D080E158CED00BAE687 /* MPNotifications.m */; };
 		6E44A00D0E2DAD66007DE8EC /* ToDo.txt in Resources */ = {isa = PBXBuildFile; fileRef = 6E44A00C0E2DAD66007DE8EC /* ToDo.txt */; };
 		6E49F37B0DFFAB0B0030C3AF /* MPInterpreterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 489DD92E0C94674B00595506 /* MPInterpreterTest.m */; };
 		6E49F37F0DFFAFF80030C3AF /* MacPorts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* MacPorts.framework */; };
@@ -89,8 +89,8 @@
 		48F811BE0CE4636A009630DE /* MPRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRegistry.h; sourceTree = "<group>"; };
 		48F811BF0CE4638C009630DE /* MPRegistry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRegistry.m; sourceTree = "<group>"; };
 		6E270C080E148F4E00BAE687 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
-		6E270D070E158CED00BAE687 /* MPNotificationsListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNotificationsListener.h; sourceTree = "<group>"; };
-		6E270D080E158CED00BAE687 /* MPNotificationsListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNotificationsListener.m; sourceTree = "<group>"; };
+		6E270D070E158CED00BAE687 /* MPNotifications.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNotifications.h; sourceTree = "<group>"; };
+		6E270D080E158CED00BAE687 /* MPNotifications.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNotifications.m; sourceTree = "<group>"; };
 		6E44A00C0E2DAD66007DE8EC /* ToDo.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ToDo.txt; sourceTree = "<group>"; };
 		6E88D1CA0DF4B90B00684E9F /* MPMacPortsTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMacPortsTest.h; sourceTree = "<group>"; };
 		6E88D1CB0DF4B90B00684E9F /* MPMacPortsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMacPortsTest.m; sourceTree = "<group>"; };
@@ -243,8 +243,8 @@
 			children = (
 				6E270C080E148F4E00BAE687 /* Makefile */,
 				6EA293570E05C8FC00902D12 /* notifications.m */,
-				6E270D070E158CED00BAE687 /* MPNotificationsListener.h */,
-				6E270D080E158CED00BAE687 /* MPNotificationsListener.m */,
+				6E270D070E158CED00BAE687 /* MPNotifications.h */,
+				6E270D080E158CED00BAE687 /* MPNotifications.m */,
 				6EEB12FF0E2BFA3000BFEC81 /* notifications.h */,
 			);
 			name = "Tcl Notifications ";
@@ -265,7 +265,7 @@
 				487679690C98C55E00577C59 /* MPPort.h in Headers */,
 				48A866AA0CD364F700B521BC /* MPReceipt.h in Headers */,
 				481D04A20CDAAAFD00D4A550 /* MPMutableDictionary.h in Headers */,
-				6E270D090E158CED00BAE687 /* MPNotificationsListener.h in Headers */,
+				6E270D090E158CED00BAE687 /* MPNotifications.h in Headers */,
 				6EEB13000E2BFA3000BFEC81 /* notifications.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -418,7 +418,7 @@
 				48A866AB0CD364F700B521BC /* MPReceipt.m in Sources */,
 				481D04A30CDAAAFD00D4A550 /* MPMutableDictionary.m in Sources */,
 				4825ECC40CE61468006B0385 /* MPRegistry.m in Sources */,
-				6E270D0A0E158CED00BAE687 /* MPNotificationsListener.m in Sources */,
+				6E270D0A0E158CED00BAE687 /* MPNotifications.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: branches/gsoc08-framework/MacPorts_Framework/MacPorts.h
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/MacPorts.h	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/MacPorts.h	2008-07-19 21:36:10 UTC (rev 38423)
@@ -41,4 +41,4 @@
 #import <MacPorts/MPRegistry.h>;
 
 //Including this file for testing the Notifications listener
-#import <MacPorts/MPNotificationsListener.h>;
+#import <MacPorts/MPNotifications.h>;

Modified: branches/gsoc08-framework/MacPorts_Framework/Makefile
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/Makefile	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/Makefile	2008-07-19 21:36:10 UTC (rev 38423)
@@ -7,7 +7,7 @@
 DESTDIR = 
 PREFIX = /Library/Tcl/notifications1.0
 
-OBJS = notifications.o MPNotificationsListener.o
+OBJS = notifications.o MPNotifications.o
 TARGET = notifications.dylib
 
 CC = gcc

Modified: branches/gsoc08-framework/MacPorts_Framework/ToDo.txt
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/ToDo.txt	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/ToDo.txt	2008-07-19 21:36:10 UTC (rev 38423)
@@ -16,6 +16,10 @@
 
 Scrub Code
 
+Sanitize NSString Code
+
+Ask Randall to look at perform exec methods
+
 Rearrange methods orderings in both .h and .m files
 and add appropriate pragma marks for more readablity
 

Modified: branches/gsoc08-framework/MacPorts_Framework/init.tcl
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/init.tcl	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/init.tcl	2008-07-19 21:36:10 UTC (rev 38423)
@@ -5,7 +5,6 @@
 catch {source \
 	[file join "/Users/Armahg/macportsbuild/build1/Library/Tcl" macports1.0 macports_fastload.tcl]}
 
-#load notifications.dylib
 
 
 package require macports
@@ -74,59 +73,7 @@
 }
 
 
-#Helper function for sending notifications 
-#Action taken is based on priority
-#ui_msg - Sent as local notifications
-#ui_debug - Don't know what to do with this for now
-#ui_warn - Send as local notification ?
-#ui_error - Send as local notification ? 
-#ui_info - Also don't know what to do with this for now
-#Remember to strip possible possible preceding "--->" from message
 
-proc notify_system {priority prefix chan str} {
-	set newstr [string trimleft $str "--->"]
-	
-	#puts $newstr
-	
-	switch $priority {
-		#For now, send these as message notifications to
-		#client application. I really think we need some more
-		#granularity, how is someone suppose to know if the 
-		#message is coming from the result of a sync, selfupdate,
-		#exec call etc. ?
-		#Suggestion : We can either have user's modify a variable that
-		#indicates the current mport operation being performed or we can
-		#inquire from the interpreter and change the notification name
-		#based on that.
-		
-		msg {
-			notifications send "MPMsgNotification" \
-			"Channel $chan Prefix $prefix" $newstr 
-		}
-		debug {
-			#For now we don't need to do anything with these?
-			#The user can scrape stdout for them
-		}
-		warn {
-			notifications send "MPWarnNotification" \
-			"Channel $chan Prefix $prefix" $newstr
-		}
-		error {
-			notifications send global "MPErrorNotification" \
-			"Channel $chan Prefix $prefix" $newstr
-		}
-		info {
-			notifications send "MPInfoNotification" \
-			"Channel $chan Prefix $prefix" $newstr
-		}
-		default {
-			#Don't send anything for now
-		}			
-	}
-}
-
-
-
 #Modifying UI initialization to enable notifications
 #Redefine ui_$pritority to throw global notifications
 #This is currently under works ... a reasonable solution
@@ -136,32 +83,24 @@
 	switch $priority {
 		msg {
 			set nottype "MPMsgNotification" 
-			set sendNotification "true"
 		}
 		debug {
-			#For now we don't need to do anything with these?
-			#The user can scrape stdout for them
 			set "MPDebugNotification"
-			set sendNotification "false"
 		}
 		warn {
 			set nottype "MPWarnNotification"
-			set sendNotification "true"
 		}
 		error {
 			set nottype "MPErrorNotification"
-			set sendNotification "true"
 		}
 		info {
 			set nottype "MPInfoNotification"
-			set sendNotification "true"
 		}
 		default {
-			#Don't send anything for now
 			set nottype "MPDefaultNotification"
-			set sendNotification "false"
 		}	
 	}
+	
     # Get the list of channels.
     try {
         set channels [ui_channels $priority]
@@ -173,14 +112,8 @@
     set nbchans [llength $channels]
     if {$nbchans == 0} {
         proc ::ui_$priority {str} [subst {
-        	#notifications send global "MP $priority Notification" "Channel1 none \
-        	#Prefix $prefix" "\$str"
-        	#notify_system $priority $prefix "none" $message 
-        	
-        	if {$sendNotification == "true"} {
-        		notifications send $nottype "Channel $chan Prefix $prefix" "\$str"
-        	}
-        	}]
+        	notifications send $nottype "Channel $chan Prefix $prefix" "\$str"
+        }]
     } else {
         try {
             set prefix [ui_prefix $priority]
@@ -195,26 +128,14 @@
                 set chan [lindex $channels 0]
                 
                 proc ::ui_$priority {str} [subst { 
-                	
                 	puts $chan "$prefix\$str"
-                	#notifications send "MP $priority Notifications" "Channel2 $chan \
-                	#Prefix $prefix" "\$str"
-                	#notify_system $priority $prefix $chan "\$str"
-                	if {$sendNotification == "true"} {
-                		notifications send $nottype "Channel $chan Prefix $prefix" "\$str"
-                	}
-                	}]
+                	notifications send $nottype "Channel $chan Prefix $prefix" "\$str"
+                }]
             } else {
             	proc ::ui_$priority {str} [subst {
             		foreach chan \$channels {
             			puts $chan "$prefix\$str"
-            			#notify_system $priority $prefix $chan $message
-            			#notifications send global "MP $priority Notifications" "Channel3 $chan \
-            			#Prefix $prefix" "\$str"
-            			
-            			if {$sendNotification == "true"} {
-            				notifications send $nottype "Channel $chan Prefix $prefix" "\$str"
-            				}
+            			notifications send $nottype "Channel $chan Prefix $prefix" "\$str"
             		}
             	}]
             }

Modified: branches/gsoc08-framework/MacPorts_Framework/notifications.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework/notifications.m	2008-07-19 20:14:07 UTC (rev 38422)
+++ branches/gsoc08-framework/MacPorts_Framework/notifications.m	2008-07-19 21:36:10 UTC (rev 38423)
@@ -40,7 +40,7 @@
 int Notifications_Send(int objc, Tcl_Obj *CONST objv[], int global, Tcl_Interp *interpreter) {
 	NSString *name , *msg;
 	NSMutableDictionary *info = nil;
-	MPNotificationsListener *mln = [MPNotificationsListener sharedListener];
+	//MPNotifications *mln = [MPNotifications sharedListener];
 	
 	int tclCount;
 	int tclResult;
@@ -79,8 +79,8 @@
 		if(objv != NULL) {
 			msg = [NSString stringWithUTF8String:Tcl_GetString(*objv)];
 			[info setObject:msg forKey:[NSString stringWithString:@"Message"]];
-			//[mln setValue:name forKey:@"infoString"];
-			[mln setInfoString:name];
+			//[mln setValue:name forKey:@"performingTclCommand"];
+			//[mln setperformingTclCommand:name];
 		}
 		
 		if (global != 0) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080719/9a308c3a/attachment-0001.html 


More information about the macports-changes mailing list