JWWalker
JWWalker

Reputation: 22717

NSHelpManager/AHGotoPage failure in macOS Sierra

I try to open a help book within a system preference pane using AHRegisterHelpBook and AHGotoPage. It works under OS 10.9, but fails under 10.12.

OSStatus err = AHGotoPage( CFSTR("AutoPairs Help"), NULL, NULL );

Specifically, the calls return noErr, but the first time I call AHGotoPage, the help window opens with a message saying that the help could not be found. Subsequent calls to AHGotoPage seem to do nothing at all. Is there some other way to open an embedded help book?

Update: Somehow I had overlooked the existence of the Cocoa class NSHelpManager. After updating my help book index with anchors and converting to use of the NSHelpManager methods registerBooksInBundle: and openHelpAnchor:inBook:, I am still in the situation where it works in Mavericks and fails in Sierra.

Sierra help fail message

Upvotes: 6

Views: 371

Answers (0)

Related Questions