Changeset 703
- Timestamp:
- 07/25/07 03:10:09 (1 year ago)
- Files:
-
- other/dps/trunk/dsssps/components.d (modified) (2 diffs)
- other/dps/trunk/dsssps/newfile.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
other/dps/trunk/dsssps/components.d
r702 r703 1 1 module dsssps.components; 2 2 3 import tango.io.Console;4 3 import tango.io.File; 5 4 … … 99 98 100 99 // now edit it 100 dpsApp.loadTopDSSSConf(); 101 101 super.activate(tree, e); 102 102 } other/dps/trunk/dsssps/newfile.d
r702 r703 1 1 module dsssps.newfile; 2 2 3 import tango.io. Console;3 import tango.io.File; 4 4 5 5 import wx.wx; … … 30 30 void OnCreate(Object s, wxEvent e) 31 31 { 32 Cout("Create ")(tctl.Value()).newline; 32 char[] name = tctl.Value().dup; 33 34 // generate the module name 35 char[] mod = name.dup; 36 foreach (i, c; mod) { 37 if (c == '/') { 38 mod[i] = '.'; 39 } else if (c == '.') { 40 // end 41 mod = mod[0..i]; 42 break; 43 } 44 } 45 46 // then fill out the basic file 47 (new File(name)).write("module " ~ mod ~ ";\n"); 48 49 // now edit it 50 dpsApp.loadTopDSSSConf(); 51 (new DPSProcessRun(editor ~ " " ~ name, &(dpsApp.loadTopDSSSConf))).Show(false); 52 53 // and get rid of this window 33 54 Destroy(); 34 55 }
