Author: rfm
Date: Wed Jul 30 12:44:08 2014
New Revision: 38020

URL: http://svn.gna.org/viewcvs/gnustep?rev=38020&view=rev
Log:
Added +ecSetup

Modified:
    libs/ec/trunk/ChangeLog
    libs/ec/trunk/EcProcess.h
    libs/ec/trunk/EcProcess.m

Modified: libs/ec/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/ChangeLog?rev=38020&r1=38019&r2=38020&view=diff
==============================================================================
--- libs/ec/trunk/ChangeLog     (original)
+++ libs/ec/trunk/ChangeLog     Wed Jul 30 12:44:08 2014
@@ -1,3 +1,9 @@
+2014-07-30  Richard Frith-Macdonald <[email protected]>
+
+       * EcProcess.h:
+       * EcProcess.m:
+       Added +ecSetup method to create/initialise the singleton instance.
+
 2014-07-01  Richard Frith-Macdonald <[email protected]>
 
        * Command.m:

Modified: libs/ec/trunk/EcProcess.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcProcess.h?rev=38020&r1=38019&r2=38020&view=diff
==============================================================================
--- libs/ec/trunk/EcProcess.h   (original)
+++ libs/ec/trunk/EcProcess.h   Wed Jul 30 12:44:08 2014
@@ -417,6 +417,14 @@
  */
 + (NSMutableDictionary*) ecInitialDefaults;
 
+/** Convenience method to create the singleton EcProcess instance
+ * using the initial configuration provided by the +ecInitialDefaults
+ * method.<br />
+ * Raises NSGenericException if the singleton instance has already
+ * been created.
+ */
++ (void) ecSetup;
+
 /** Convenience method to produce a generic configuration alarm and send
  * it via the -alarm: method.<br />
  * The managed object may be nil (in which case it's the default managed object

Modified: libs/ec/trunk/EcProcess.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcProcess.m?rev=38020&r1=38019&r2=38020&view=diff
==============================================================================
--- libs/ec/trunk/EcProcess.m   (original)
+++ libs/ec/trunk/EcProcess.m   Wed Jul 30 12:44:08 2014
@@ -1023,6 +1023,16 @@
   return [NSMutableDictionary dictionaryWithObjects: objects
                                             forKeys: keys
                                               count: 2];
+}
+
++ (void) ecSetup
+{
+  if (nil != EcProc)
+    {
+      [NSException raise: NSGenericException
+                  format: @"+ecSetup called when EcProcess is already set up"];
+    }
+  [[self alloc] init];
 }
 
 - (void) _commandRemove


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to