• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Opening help in Help Viewer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Opening help in Help Viewer


  • Subject: Opening help in Help Viewer
  • From: Matt Ridley <email@hidden>
  • Date: Wed, 9 May 2001 03:41:35 +0100

Hi folks,

In SimpleCocoaApp (an example Cocoa application from Apple), the Help menu-item is connected to an action whose implementation is as follows:


NSString *path = [[NSBundle mainBundle] pathForResource:@"ReadMe"
ofType:@"html"];
if (path)
[[NSWorkspace sharedWorkspace] openFile:path
withApplication:@"Help Viewer"];


The file "ReadMe.html" does exist in the project, is part of the current target, and has no creator-code (so when double-clicked it opens in the default application for ".html" files). The problem is that the code doesn't seem to work; instead, it just opens the file in the default ".html" application, rather than in Help Viewer. It's the same whether or not the "ReadMe.html" is specified as the Help file in the target's Build Options.

Are others seeing this too, or does the above code work for you? You can get SimpleCocoaApp from developer.apple.com, in the Cocoa section of the Sample Code area. The code above is straight from SimpleCocoaApp; it's not mine.


Best,
-Matt

--
Matt Ridley
<http://www.mattridley.com/>


  • Prev by Date: URLs in TextView
  • Next by Date: Newbie Question: NSTabView and NSTabViewItem
  • Previous by thread: Re: URLs in TextView: success
  • Next by thread: Newbie Question: NSTabView and NSTabViewItem
  • Index(es):
    • Date
    • Thread