NSHelpManager / AHGotoPage error on macOS Sierra

I am trying to open a reference book in the system preferences panel using AHRegisterHelpBookand AHGotoPage. It works under OS 10.9, but does not work until 10.12.

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

In particular, calls return noErr, but the first call AHGotoPageopens a help window with a message stating that help was not found. Subsequent calls AHGotoPagedo not seem to do anything. Is there any other way to open the built-in help book?

Update: somehow, I overlooked the existence of the Cocoa class NSHelpManager. After updating the index of my reference book with bindings and converting to methods NSHelpManager registerBooksInBundle:and openHelpAnchor:inBook:, I am still in a situation where it works in Mavericks and does not work in Sierra.

Sierrara Crash Report

+4

Source: https://habr.com/ru/post/1661996/


All Articles