Extra help menu action (for HowTo)

This commit is contained in:
nigel 2003-03-26 00:20:54 +00:00
parent 5f7830a3d5
commit 0ba592d6f4
2 changed files with 16 additions and 1 deletions

View File

@ -41,6 +41,7 @@
type: (NSEventType)type; type: (NSEventType)type;
- (IBAction) HelpHowTo: (id)sender;
- (IBAction) HelpToDo: (id)sender; - (IBAction) HelpToDo: (id)sender;
- (IBAction) HelpVersions: (id)sender; - (IBAction) HelpVersions: (id)sender;

View File

@ -258,6 +258,19 @@
// Methods to display documentation: // Methods to display documentation:
- (IBAction) HelpHowTo: (id)sender
{
NSString *path = [[NSBundle mainBundle] pathForResource: @"HowTo"
ofType: @"html"];
if ( ! path )
InfoSheet(@"Cannot find HowTo.html", [theEmulator window]);
else
if ( ! [[NSWorkspace sharedWorkspace] openFile: path
withApplication: @"TextEdit"] )
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"
@ -281,7 +294,8 @@
else else
if ( ! [[NSWorkspace sharedWorkspace] openFile: path if ( ! [[NSWorkspace sharedWorkspace] openFile: path
withApplication: @"TextEdit"] ) withApplication: @"TextEdit"] )
InfoSheet(@"Cannot open Versions.html with TextEdit", [theEmulator window]); InfoSheet(@"Cannot open Versions.html with TextEdit",
[theEmulator window]);
} }