diff mde/setup/Init.d @ 103:42e241e7be3e

ContentList content type; getting content items/lists from Options generically via content.Items, and a new addContent widget function. Several improvements to generic handling of content. New button-with-text widget. Some tidy-up. Some name changes, to increase uniformity. Bug-fix: floating widgets of fixed size could previously be made larger than intended from config dimdata.
author Diggory Hardy <diggory.hardy@gmail.com>
date Tue, 25 Nov 2008 18:01:44 +0000
parents ba035eba07b4
children 1b1e2297e2fc
line wrap: on
line diff
--- a/mde/setup/Init.d	Sat Nov 22 20:59:36 2008 +0000
+++ b/mde/setup/Init.d	Tue Nov 25 18:01:44 2008 +0000
@@ -325,7 +325,6 @@
                     
                     // Do a job:
                     try {
-                        // FIXME - old stage start&finish trace messages - we don't have a name!
                         static if (startup) {
                             debug logger.trace ("({}) InitStage {}: starting init", threadNum, stage.name);
                             stage.state = (*stage).init();  // init is a property of a pointer (oh no!)
@@ -449,8 +448,8 @@
         foreach (key,stage_p; stages)
             foreach (name; stage_p.depends)
                 stages[name].rdepends ~= key;
-        int realMaxThreads = miscOpts.maxThreads();
-        miscOpts.maxThreads = 4;	// force up to 4 threads for unittest
+        IntContent realMaxThreads = miscOpts.maxThreads;
+        miscOpts.maxThreads = new IntContent ("maxThreads", 4);	// force up to 4 threads for unittest
         
         logger.level(Logger.Info);              // hide a lot of trace messages
         logger.info ("You should see some warning messages starting \"InitStage\":");
@@ -490,6 +489,7 @@
         assert (stages[toStageName("stg3")].state == cast(StageState)7);        // set by the exception
         
         stages = realInit;      // restore the real init stages
+	delete miscOpts.maxThreads;
         miscOpts.maxThreads = realMaxThreads;
         logger.info ("Unittest complete.");
     }