Changeset 480 for trunk/demos/gtk/SpawnTests.d
- Timestamp:
- 03/25/08 18:16:02 (8 months ago)
- Files:
-
- trunk/demos/gtk/SpawnTests.d (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/demos/gtk/SpawnTests.d
r358 r480 37 37 import tango.text.Util; 38 38 import tango.io.Stdout; 39 void writefln( char[]frm, ... ){40 char[]frm2 = substitute( frm, "%s", "{}" );39 void writefln( string frm, ... ){ 40 string frm2 = substitute( frm, "%s", "{}" ); 41 41 Stdout( Stdout.layout.convert( _arguments, _argptr, frm2 )).newline; 42 42 } … … 84 84 { 85 85 version(Tango){ 86 char[][] args = split( viewInput.getBuffer().getText(), " " );86 string[] args = split( viewInput.getBuffer().getText(), " " ); 87 87 } 88 88 else{ 89 char[][] args = std.string.split(viewInput.getBuffer().getText());89 string[] args = std.string.split(viewInput.getBuffer().getText()); 90 90 } 91 91 exec(args); 92 92 } 93 93 94 private bool exec( char[][] args)95 { 96 foreach ( int i, char[]arg ; args)94 private bool exec(string[] args) 95 { 96 foreach ( int i, string arg ; args) 97 97 { 98 98 writefln("[%s] >%s<", i, arg); … … 171 171 } 172 172 173 public bool syncOutput( char[]line)173 public bool syncOutput(string line) 174 174 { 175 175 TextIter iter = new TextIter(); … … 179 179 } 180 180 181 public bool syncError( char[]line)181 public bool syncError(string line) 182 182 { 183 183 TextIter iter = new TextIter(); … … 187 187 } 188 188 189 public void setInput( char[][] args)189 public void setInput(string[] args) 190 190 { 191 191 TextBuffer inBuffer = viewInput.getBuffer(); 192 char[]t;193 foreach ( int count, char[]arg; args)192 string t; 193 foreach ( int count, string arg; args) 194 194 { 195 195 if ( count > 0 ) t ~= " "; … … 199 199 } 200 200 201 public void setInput( char[]arg)201 public void setInput(string arg) 202 202 { 203 203 viewInput.getBuffer().setText(arg); … … 207 207 } 208 208 209 void main( char[][] args)209 void main(string[] args) 210 210 { 211 211 GtkD.init(args);
