• 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
Re: about help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: about help


  • Subject: Re: about help
  • From: Jessica Kahn <email@hidden>
  • Date: Mon, 11 Feb 2002 15:20:51 -0800

Please file a bug report to cover this enhancement request. Thanks!

--Jessica


On Monday, February 11, 2002, at 02:12 PM, Gerriet M. Denkmann wrote:

Acting on suggestions received (thanks very much!) I have made a Category for NSView:

#import <Carbon/Carbon.h>
#import <Cocoa/Cocoa.h>

@implementation NSView( NSViewHelpGmd )

- (void)helpRequested:(NSEvent *)eventPtr;
{
NSBundle *mainBundle = [ NSBundle mainBundle ] ;
NSDictionary *infoDictionary = [ mainBundle infoDictionary ];
NSString *helpBookName = [ infoDictionary objectForKey: @"CFBundleHelpBookFolder" ] ;
NSString *toolTipString ;
NSView *vv ;
OSStatus err ;

// find some view with a tool tip
vv = self ;
for(;;)
{
toolTipString = [ vv toolTip ] ;
if ( toolTipString != nil ) break ;
vv = [ vv superview ] ;
if ( vv == nil ) break;
};

if ( toolTipString == nil ) // open book
{
err = AHGotoPage( (CFStringRef)helpBookName, nil, nil );
}
else // search in book
{
err = AHSearch( (CFStringRef)helpBookName, (CFStringRef)toolTipString );
};

if ( err != 0 )
{
NSLog(@"helpRequested failed for %@", [ self description ]);
}
else
{
//NSLog(@"helpRequested for %@", [ self description ]);
};
}

@end

Hitting the help key gives a ?-cursor, then clicking on any window, button or whatever opens the help text (searching for the tool tip string in the help book). So far so good.

But wouldn't it be nice if Apple could add (along with the tool tip text) a help-url, and make helpRequested: open this url automatically? Using the tool tip as search string is clearly only the second best solution.

Gerriet.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: about help
      • From: "Gerriet M. Denkmann" <email@hidden>
    • Re: about help
      • From: Jake MacMullin <email@hidden>
References: 
 >Re: about help (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: how to inspect a running app?
  • Next by Date: Re: how to inspect a running app?
  • Previous by thread: Re: about help
  • Next by thread: Re: about help
  • Index(es):
    • Date
    • Thread