diff --git a/BasiliskII/src/MacOSX/Controller.h b/BasiliskII/src/MacOSX/Controller.h index 0f03e96b..31998d12 100644 --- a/BasiliskII/src/MacOSX/Controller.h +++ b/BasiliskII/src/MacOSX/Controller.h @@ -41,6 +41,7 @@ type: (NSEventType)type; +- (IBAction) HelpHowTo: (id)sender; - (IBAction) HelpToDo: (id)sender; - (IBAction) HelpVersions: (id)sender; diff --git a/BasiliskII/src/MacOSX/Controller.mm b/BasiliskII/src/MacOSX/Controller.mm index ca8b775a..383d560f 100644 --- a/BasiliskII/src/MacOSX/Controller.mm +++ b/BasiliskII/src/MacOSX/Controller.mm @@ -258,6 +258,19 @@ // 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 { NSString *path = [[NSBundle mainBundle] pathForResource: @"ToDo" @@ -281,7 +294,8 @@ else if ( ! [[NSWorkspace sharedWorkspace] openFile: path withApplication: @"TextEdit"] ) - InfoSheet(@"Cannot open Versions.html with TextEdit", [theEmulator window]); + InfoSheet(@"Cannot open Versions.html with TextEdit", + [theEmulator window]); }