Permalink
Browse files

Added various program options to the user interface.

+ A trailing slash is removed from the source path by the directory reader.
+ Added UI output of the processing time.
+ Added UI option to print lines to the console.
+ Changed read mode switch to radio group in the user interface.
+ Minor bugfix: Empty files are not read.
  • Loading branch information...
johnjohndoe committed Oct 12, 2010
1 parent 0c896b0 commit ab074ffa3f81026640f44a727cf4b8a1945c1a9a
Showing with 567 additions and 150 deletions.
  1. +4 −1 DirectoryReader.m
  2. +434 −94 English.lproj/MainMenu.xib
  3. +4 −2 FileReader.m
  4. +24 −7 LineReaderAppDelegate.h
  5. +101 −46 LineReaderAppDelegate.m
View
@@ -27,7 +27,10 @@ - (id)initWithPath:(NSString*)path {
if (!path || [path length] <= 0) {
return nil;
}
- m_path = path;
+ // Remove trailing slash if appended.
+ NSMutableString* mutablePath = [NSMutableString stringWithString:path];
+ [mutablePath replaceOccurrencesOfString:@"/" withString:@"" options:NSBackwardsSearch range:NSMakeRange([path length] - 1, 1)];
+ m_path = mutablePath;
}
return self;
}
Oops, something went wrong.

0 comments on commit ab074ff

Please sign in to comment.