=================================================================== RCS file: /home/cvs/OpenXM/src/cfep/MyDocument.m,v retrieving revision 1.4 retrieving revision 1.6 diff -u -p -r1.4 -r1.6 --- OpenXM/src/cfep/MyDocument.m 2006/03/08 04:58:14 1.4 +++ OpenXM/src/cfep/MyDocument.m 2006/03/12 07:09:51 1.6 @@ -245,8 +245,11 @@ static NSMenuItem *menuItemPrettyPrint = nil; // pret NSLog(@"myDocumentSaidTheMessageAboutX=%d\n",myDocumentSaidTheMessageAboutX); if (!myDocumentSaidTheMessageAboutX) { if ([MyEnvironment checkX] != 1) - [self messageDialog: - NSLocalizedString(@"A few commands (plot, ...) cannot be used, because X11 is not running.",nil) with: 0]; + // [self messageDialog: + // NSLocalizedString(@"A few commands (plot, ...) cannot be used, because X11 is not running.",nil) with: 0]; + [self changeOutputCounterFieldWithString: + [NSLocalizedString(@"Output mini-view: ",nil) stringByAppendingString: + NSLocalizedString(@"A few commands (plot, ...) cannot be used, because X11 is not running.",nil)]]; myDocumentSaidTheMessageAboutX = 1; } } @@ -289,7 +292,13 @@ static NSMenuItem *menuItemPrettyPrint = nil; // pret [textViewIn replaceCharactersInRange: NSMakeRange(pos,0) withString: @"\n"]; } cmd0 = [cmd0 substringWithRange:r ]; - } + } + [self outputBorderLine: [NSColor magentaColor]]; + [self outputString: cmd0]; + if ([cmd0 length] > 0) { + if ([cmd0 characterAtIndex: ([cmd0 length]-1)] != 0xa) [self outputString: @"\n"]; + } + [self outputBorderLine: [NSColor yellowColor]]; }else{ cmd0 = [textViewIn string]; MyOutputWindowController *mc; @@ -408,6 +417,11 @@ static NSMenuItem *menuItemPrettyPrint = nil; // pret else [mc outputStringToOutputWindow: amt]; } } +-(void)outputBorderLine: (NSColor *)color { + MyOutputWindowController *mc; + mc = [MyOutputWindowController sharedMyOutputWindowController: self]; + [mc outputStringToOutputWindow: @"----------------------------------------\n" withColor: color]; +} - (void) outputErrorString: (NSString *) amt { int oldEnd; int newEnd; @@ -1051,7 +1065,8 @@ int debugInbound = 0; -(void)openGLMeta: (NSString *) cmd to: (int) gid{ MyOpenGLController *oglc; oglc = [MyOpenGLController getOglWindow: gid]; - if (!oglc) {[self outputErrorString: [NSString stringWithFormat: @"Invalid gid %d in openGLMeta\n",gid]]; return; } + if (!oglc) {[self printErrorMessage: + [NSString stringWithFormat: @"Invalid gid %d in openGLMeta command %@\n",gid,cmd]]; return; } if ([cmd hasPrefix: @"meta_showListOfOglComm"]) { [self showListOfOglComm: gid]; return ; }else if ([cmd hasPrefix: @"meta_removeAllInit"]) { // longer command must come first, because we use prefix. @@ -1063,7 +1078,7 @@ int debugInbound = 0; }else if ([cmd hasPrefix: @"meta_removeLast"]) { [oglc removeLastOfOglComm]; }else{ - [self outputErrorString: [NSString stringWithFormat: @"Unknown OpenGL meta command %@\n",cmd]]; + [self printErrorMessage: [NSString stringWithFormat: @"Unknown OpenGL meta command %@\n",cmd]]; } } -(void) showListOfOglComm: (int) gid {