Help and High Sierra


In the previous OS, to display a specific help file from my application, I wrote:

set helpPath to (current application's NSBundle's mainBundle()'s pathForResource_ofType_("Help/pgs/file", "html") as string)
current application's NSWorkspace's sharedWorkspace()'s openFile: helpPath withApplication:("/System/Library/CoreServices/")

It doesn’t correctly work anymore in High Sierra. :frowning:

If I run the Help Mac and my help file after, it’s OK but impossible to directly display my file. Is it a bug of HelpViewer? I don’t know…

Please, have you a solution?
Thanks a lot!

As I read the documentations, your code shouldn’t work. For pathForResource:ofType: it says:

Try using pathForResource:ofType:inDirectory:.

set helpPath to current application's NSBundle's mainBundle()'s pathForResource"file" ofType:"html" inDirectory:"Help/pgs"

Thanks Shane,

Same problem.
HelpViewer is running (seen in the Activity Monitor) but don’t display anything.
Before, if I open the Help from the Help menu (showHelp: action in the Interface), the file is open in HelpViewer. :confused:

Else… call the showHelp method before?

                set myHelp to current application's class "NSApplication"'s sharedApplication()'s showHelp:("")

Is it correct?

I’ve never used HelpViewer, so I’m afraid I can’t offer any other suggestions.