Default app for HowTo.html (instead of TextEdit), formatting (spaces->tabs)

This commit is contained in:
nigel 2003-08-16 02:47:27 +00:00
parent 75f84b51ce
commit cb6adb6291

View File

@ -108,9 +108,9 @@
// //
// switch ( NSRunAlertPanel(title, msg, def, alt, other, nil) ) // switch ( NSRunAlertPanel(title, msg, def, alt, other, nil) )
// { // {
// case NSAlertDefault: savePrefs(); // case NSAlertDefault: savePrefs();
// case NSAlertAlternate: return NSTerminateNow; // case NSAlertAlternate: return NSTerminateNow;
// case NSAlertOther: return NSTerminateCancel; // case NSAlertOther: return NSTerminateCancel;
// } // }
// } // }
@ -261,41 +261,40 @@
- (IBAction) HelpHowTo: (id)sender - (IBAction) HelpHowTo: (id)sender
{ {
NSString *path = [[NSBundle mainBundle] pathForResource: @"HowTo" NSString *path = [[NSBundle mainBundle] pathForResource: @"HowTo"
ofType: @"html"]; ofType: @"html"];
if ( ! path ) if ( ! path )
InfoSheet(@"Cannot find HowTo.html", [theEmulator window]); InfoSheet(@"Cannot find HowTo.html", [theEmulator window]);
else else
if ( ! [[NSWorkspace sharedWorkspace] openFile: path if ( ! [[NSWorkspace sharedWorkspace] openFile: path] )
withApplication: @"TextEdit"] ) InfoSheet(@"Cannot open HowTo.html with default app", [theEmulator window]);
InfoSheet(@"Cannot open HowTo.html with TextEdit", [theEmulator window]);
} }
- (IBAction) HelpToDo: (id)sender - (IBAction) HelpToDo: (id)sender
{ {
NSString *path = [[NSBundle mainBundle] pathForResource: @"ToDo" NSString *path = [[NSBundle mainBundle] pathForResource: @"ToDo"
ofType: @"html"]; ofType: @"html"];
if ( ! path ) if ( ! path )
InfoSheet(@"Cannot find ToDo.html", [theEmulator window]); InfoSheet(@"Cannot find ToDo.html", [theEmulator window]);
else else
if ( ! [[NSWorkspace sharedWorkspace] openFile: path if ( ! [[NSWorkspace sharedWorkspace] openFile: path
withApplication: @"TextEdit"] ) withApplication: @"TextEdit"] )
InfoSheet(@"Cannot open ToDo.html with TextEdit", [theEmulator window]); InfoSheet(@"Cannot open ToDo.html with TextEdit", [theEmulator window]);
} }
- (IBAction) HelpVersions: (id)sender - (IBAction) HelpVersions: (id)sender
{ {
NSString *path = [[NSBundle mainBundle] pathForResource: @"Versions" NSString *path = [[NSBundle mainBundle] pathForResource: @"Versions"
ofType: @"html"]; ofType: @"html"];
if ( ! path ) if ( ! path )
InfoSheet(@"Cannot find Versions.html", [theEmulator window]); InfoSheet(@"Cannot find Versions.html", [theEmulator window]);
else else
if ( ! [[NSWorkspace sharedWorkspace] openFile: path if ( ! [[NSWorkspace sharedWorkspace] openFile: path
withApplication: @"TextEdit"] ) withApplication: @"TextEdit"] )
InfoSheet(@"Cannot open Versions.html with TextEdit", InfoSheet(@"Cannot open Versions.html with TextEdit",
[theEmulator window]); [theEmulator window]);
} }