Re: Tcl::pTk overwrite About [macOS]

2018-08-14 Thread Christopher Chavez



> On Aug 13, 2018, at 1:22 PM, welle Ozean via tcltk  wrote:
> 
> Hello,
> 
> I have a Tk application for macOS written with Tcl::pTk and packed as a 
> normal macOS bundle. In the macOS menu, under the name of the application 
> bundle there is a menu item called "About + Name of application". This is 
> created auotmatically and contains the Tcl version. In this About menu, I 
> would like to replace/integrate the default values with information about my 
> App. Is this possible? If yes, how? I couldn't find any information online.
> 
> Best,
> Welle

Hi Welle,

I have been curious about this feature myself, but I have yet to figure out how 
exactly to use it from Perl (whether through Tcl::pTk, Tkx, etc.). The Tcl/Tk 
widget demo is able to set its own About entry, so the capability in Tcl/Tk 
should be working and available for our use from Perl.

The main idea is to add an About entry to a special `apple` menu. For some 
background on this feature, there’s Tk’s documentation of using it: 
https://www.tcl.tk/man/tcl/TkCmd/menu.htm#M21 . Perl/Tk had adapted that 
verbiage in 
https://metacpan.org/pod/distribution/Tk/pod/Menu.pod#SPECIAL-MENUS-IN-MENUBARS 
but clearly that’s not been updated since Mac OS classic. TkDocs also explains 
how this feature works and how to use it from other languages besides Tk (Ruby, 
Perl using Tkx, and Python using Tkinter): 
https://tkdocs.com/tutorial/menus.html

However none of the Tkx examples had an effect when I tried it (they still had 
the default About dialog), whether from TkDocs’ example or the examples 
included with Tkx (tkx-ed and menu scripts). I was hoping to adapt the Tkx 
usage to Tcl::pTk syntax once I got it working.

Note that the windowingsystem should be checked prior to using the `apple` 
menu, i.e. placed in something like `if($widget->windowing system eq 'aqua') { 
… }`.

Tcl::pTk overwrite About [macOS]

2018-08-13 Thread welle Ozean via tcltk
Hello,

I have a Tk application for macOS written with Tcl::pTk and packed as a
normal macOS bundle. In the macOS menu, under the name of the application
bundle there is a menu item called "About + Name of application". This is
created auotmatically and contains the Tcl version. In this About menu, I
would like to replace/integrate the default values with information about
my App. Is this possible? If yes, how? I couldn't find any information
online.

Best,
Welle