For Programmers: Free Programming Magazines  


Home > Archive > Tcl > July 2007 > Help menu item on Mac OS X









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Help menu item on Mac OS X
Synic

2007-07-24, 7:13 pm

Hi Mac using folk.

A bit of feedback I've received recently is that my 'Help > Appname Help'
menu item exists but doesn't do anything. It's the one which is, by
default, associated with the Meta-? accelerator.

Setting the menu item for 'Appname > Preferences' involved the creation
of a proc as follows:

proc ::tk::mac::ShowPreferences {} { SomePrefsProc }

I assume setting that Help menu item involves a similar procedure, but,
I can't find the proc name which needs to be defined documented anywhere.
Can anyone assist?

(Even better, is there a page with all of the important ::tk::mac procs
listed?)

Thanks.

Kevin Walzer

2007-07-24, 7:13 pm

Synic wrote:
> Hi Mac using folk.
>
> A bit of feedback I've received recently is that my 'Help > Appname Help'
> menu item exists but doesn't do anything. It's the one which is, by
> default, associated with the Meta-? accelerator.
>
> Setting the menu item for 'Appname > Preferences' involved the creation
> of a proc as follows:
>
> proc ::tk::mac::ShowPreferences {} { SomePrefsProc }
>
> I assume setting that Help menu item involves a similar procedure, but,
> I can't find the proc name which needs to be defined documented anywhere.
> Can anyone assist?
>
> (Even better, is there a page with all of the important ::tk::mac procs
> listed?)
>
> Thanks.
>

You need to define your own procedure to display help--there's no
built-in command.

There are a few ways to do this. One that many folks use is simply to
open an HTML file in a browser:

proc showhelp {} {
exec open /path/to/myhelpfile.html
}

Another, more native option would be to prepare an Apple help book and
use my tclAppleHelp extension to load it:

http://tk-components.sourceforge.ne...help/index.html

Another option might be my tkHelpBrowser package (pure Tcl, and
cross-platform), here:

http://tk-components.sourceforge.ne...wser/index.html

Hope this helps,
Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
Synic

2007-07-24, 7:13 pm

Kevin Walzer <kw@codebykevin.com> wrote:
> Synic wrote:

[...]
[...][color=darkred]
> You need to define your own procedure to display help--there's no
> built-in command.


Hmm. I think what's happening is TDK4 is perhaps defining the menu option,
either in the Basekit or somewhere else. When running the script unwrapped
with wish8.4, there's no 'Appname Help' option in the Help menu as it's not
set in my script anywhere.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com