我正在为我的申请写帮助书。根据需要,我在应用程序的info.plist中有CFBundleHelpBookName和CFBundleHelpBookFolder键,并且我正在使用新的Snow Leopard.help包格式作为帮助手册。precables.help/Contents/Info.plist中的各个键都是按照
Apple Help Programming Guide
. 正如所料,当用户从“帮助”菜单中选择“排练帮助”时,“我的帮助”手册的索引页(在适当的本地化中,当前仅为英语)将在“帮助查看器”中打开。
<a name="support"></a>
然后我可以从另一个文件链接到它,如下所示:
<a href="help:anchor=support bookID=info.thaesofereode.Rehearsals.help">Support</a>
<a href="help:anchor=support">Support</a>
Help viewer会显示一张纸,上面写着“Help viewer无法打开此内容”。如果我在Help viewer和helpd中打开调试日志,我会看到:
10/03/2010 15:46:02 HelpViewer[2049] decidePolicyForNavigationAction: help:anchor=support%20bookID=info.thaesofereode.Rehearsals.help
10/03/2010 15:46:02 HelpViewer[2049] decidePolicyForNavigationAction: apple-help-content:help:anchor=support%2520bookID=info.thaesofereode.Rehearsals.help
10/03/2010 15:46:02 HelpViewer[2049] willSendRequest: <NSMutableURLRequest apple-help-content:help:anchor=support%2520bookID=info.thaesofereode.Rehearsals.help>
10/03/2010 15:46:02 HelpViewer[2049] Start loading apple-help-content:help:anchor=support%2520bookID=info.thaesofereode.Rehearsals.help
10/03/2010 15:46:02 HelpViewer[2049] Starting search for query "support" with return port com.apple.helpd-26755
10/03/2010 15:46:02 helpd[2050] PID #2050 - received message #0: HPDStartMessageID
10/03/2010 15:46:02 helpd[2050] Process 2049 requested callback at com.apple.helpd-26755 and sent query: HPDQuery 289928762.026442: "support" in ("info.thaesofereode.Rehearsals.help") of types ("com.apple.HelpArticleResult") with limit 0
10/03/2010 15:46:02 helpd[2050] Run loops which have yet to start: (
"com.apple.kbPlugin",
"com.apple.helpbookPlugin"
)
10/03/2010 15:46:02 helpd[2050] Search for this query has been delayed 1 time: support
10/03/2010 15:46:02 helpd[2050] Delayed search for query: "support"
10/03/2010 15:46:02 helpd[2050] Starting help articles search for query: "support"
10/03/2010 15:46:02 helpd[2050] Query 289928762.026442 returned results: (
)
10/03/2010 15:46:02 helpd[2050] Response sent to port: com.apple.helpd-26755
10/03/2010 15:46:02 helpd[2050] Query finished: HPDQuery 289928762.026442: "support" in ("info.thaesofereode.Rehearsals.help") of types ("com.apple.HelpArticleResult") with limit 0
10/03/2010 15:46:02 helpd[2050] Response sent to port: com.apple.helpd-26755
10/03/2010 15:46:02 HelpViewer[2049] <HVAnchorURLHandler: 0x1002bde50> finished query: HPDQuery 289928762.026442: "support" in ("info.thaesofereode.Rehearsals.help") of types ("com.apple.HelpArticleResult") with limit 0
10/03/2010 15:46:02 HelpViewer[2049] <HVAnchorURLHandler: 0x1002bde50> has results: {
}
10/03/2010 15:46:02 HelpViewer[2049] Found no results for support