[BACK]Return to MyOutputWindowController.m CVS log [TXT][DIR] Up to [local] / OpenXM / src / cfep

Diff for /OpenXM/src/cfep/MyOutputWindowController.m between version 1.2 and 1.3

version 1.2, 2006/03/06 08:55:31 version 1.3, 2006/03/07 11:15:23
Line 71 
Line 71 
 }  }
   
 -(void)outputStringToOutputWindow:(NSString *)msg {  -(void)outputStringToOutputWindow:(NSString *)msg {
     [self outputStringToOutputWindow: msg withColor: [NSColor blackColor]];
   }
   -(void)outputStringToOutputWindow:(NSString *)msg withColor: (NSColor *) color {
     int oldEnd, newEnd;
   NSRange myRange = NSMakeRange([[textViewOut textStorage] length],0);    NSRange myRange = NSMakeRange([[textViewOut textStorage] length],0);
     oldEnd = myRange.location;
   // NSLog(@"<MyOutputWindowController> outputStringToOutputWindow\n");    // NSLog(@"<MyOutputWindowController> outputStringToOutputWindow\n");
   [textViewOut replaceCharactersInRange: myRange withString: msg];    [textViewOut replaceCharactersInRange: myRange withString: msg];
   [textViewOut scrollRangeToVisible: NSMakeRange([[textViewOut textStorage] length],0)];    myRange = NSMakeRange([[textViewOut textStorage] length],0);
     newEnd = myRange.location;
     [textViewOut setTextColor: color range: NSMakeRange(oldEnd,newEnd-oldEnd)];
     [textViewOut scrollRangeToVisible: myRange];
 }  }
   
 -(void)insertText: (id) text {  -(void)insertText: (id) text {
     NSRange myRange = NSMakeRange([[textViewOut textStorage] length],0);
     [textViewOut replaceCharactersInRange: myRange withString: @""];  // goto the end of output window.
   [textViewOut insertText: text];    [textViewOut insertText: text];
   [textViewOut scrollRangeToVisible: NSMakeRange([[textViewOut textStorage] length],0)];    [textViewOut scrollRangeToVisible: NSMakeRange([[textViewOut textStorage] length],0)];
 }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>