代码之家  ›  专栏  ›  技术社区  ›  user23743

我应该如何在雪豹帮助包中使用帮助:URL?

  •  2
  • user23743  · 技术社区  · 15 年前

    我正在为我的申请写帮助书。根据需要,我在应用程序的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
    

    2 回复  |  直到 15 年前
        1
  •  6
  •   user23743 user23743    15 年前

    结果证明这些锚和url是正确的,helpd会自动索引内容,但它保持了一个攻击性的缓存。如果帮助手册在更新时没有更改版本号,则不会扫描新的定位点。

    rm -rf ~/Library/Caches/com.apple.help*
    killall helpd
    
        2
  •  0
  •   drstrangeP0rk    15 年前

    您是否在帮助索引器实用程序的首选项中选择了锚定索引来索引帮助手册? 好像锚不是索引。。。

    当然,我也会检查我的主播的名字,因为,但我忘记了10分钟后,做或说的事情。。。