=================================================================== RCS file: /home/cvs/OpenXM/src/cfep/MyDocument.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -p -r1.4 -r1.5 --- OpenXM/src/cfep/MyDocument.m 2006/03/08 04:58:14 1.4 +++ OpenXM/src/cfep/MyDocument.m 2006/03/10 11:48:01 1.5 @@ -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; } } @@ -273,6 +276,7 @@ static NSMenuItem *menuItemPrettyPrint = nil; // pret cmd0 = [self getContentsOfInputCell]; [self prepareOutputCell]; }else if (onlySelectedArea) { + [self outputBorderLine: [NSColor yellowColor]]; r = [textViewIn selectedRange]; // NSLog(@"r=(%d,%d)\n",r.location,r.length); cmd0 = [textViewIn string]; @@ -408,6 +412,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 +1060,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 +1073,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 {