From: Zhang Weiwu on
I found:

1. If I don't configure a menubar, there is a "default menu" on Mac
OS X 10.05 for my application that contains an Edit menu, with
"Copy", "Paste", "Clear" options.
2. If I configure a menubar, my menu replaces "default menu", thus if
I didn't define an "Edit" menu, there is no "Edit" menu. here is
how I configure a menu:
.config -menu myMenubar

Problem being I need to configure a menubar, as I have a few things to
add, the default is not enough. But if I do so, I guess I have to
re-implement the good default "Edit" menu. Question:

1. Do I have to re-implement the Edit menu? The default one looks
good to me, especially it is nice layout and probably translated
to Mac OS X's user's own language. Re-implement something good
looks stupid.
2. If re-implement the menu is necessary, is there a standard code
reference? I could make it "the way I like" but I am not using Mac
OS every day, thus prefer some professional native implementation
"the way Mac OS should be". For example, Mac OS seems to flash the
default Edit menu when user do "Command-C" key shortcut, this
behavior I don't know if I should re-make and how. A native
developer of Mac OS must be able to do it better then me, they
probably did and put the code somewhere for others to copy.


Thanks in advance! FYI I searched wiki first without luck. Further,
there are so many pages about Mac OS with title close to each other in
their meaning, thus if I got good method here on usenet, I also would
not know which is the right page to share the answer on wiki. Please
hint. Thanks. I have recently done pretty much editing on wiki (thanks
the wikimaster for approving all of my changes and add their own
correction), and would like to improve it further with this answer.
From: Kevin Walzer on
On 6/13/10 10:26 PM, Zhang Weiwu wrote:
> I found:
>
> 1. If I don't configure a menubar, there is a "default menu" on Mac
> OS X 10.05 for my application that contains an Edit menu, with
> "Copy", "Paste", "Clear" options.
> 2. If I configure a menubar, my menu replaces "default menu", thus if
> I didn't define an "Edit" menu, there is no "Edit" menu. here is
> how I configure a menu:
> .config -menu myMenubar
>
> Problem being I need to configure a menubar, as I have a few things to
> add, the default is not enough. But if I do so, I guess I have to
> re-implement the good default "Edit" menu. Question:
>
> 1. Do I have to re-implement the Edit menu? The default one looks
> good to me, especially it is nice layout and probably translated
> to Mac OS X's user's own language. Re-implement something good
> looks stupid.

Unfortunately, it's either the default menu or one you provide. They
can't be mixed and match. Tk on the Mac provides a default menu because
all applications must have have some sort of menu.

> 2. If re-implement the menu is necessary, is there a standard code
> reference? I could make it "the way I like" but I am not using Mac
> OS every day, thus prefer some professional native implementation
> "the way Mac OS should be". For example, Mac OS seems to flash the
> default Edit menu when user do "Command-C" key shortcut, this
> behavior I don't know if I should re-make and how. A native
> developer of Mac OS must be able to do it better then me, they
> probably did and put the code somewhere for others to copy.
>

It's nothing complicated: just implement the basic edit menu commands
(copy, paste, cut, perhaps select all) and bind to the appropriate
keyboard shortcuts (Command instead of Control). There are multiple wiki
pages that include sample edit menus.

--Kevin

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