I discovered something odd yesterday. I was attempting to implement a cut and paste feature in a client's application. The feature will allow a user to cut or copy a chart from one place, and paste it into another place in an application (alas, it is virtually impossible to paste to an external application).
My initial attempt consisted of adding custom context menu items named "Copy", "Cut", and "Paste". I compiled, fired up the application, right clicked on a chart, and nada - no new menu items. There were other custom context menu items, previously implemented to allow export.
I thought there was some issue with compilation, and perhaps my change hadn't taken. So I changed the name of one of the other menu items. That worked, but still no Copy/Cut/Paste. I spent half an hour testing various permutations of adding menu items in different orders, clearing out the menu items first. Nothing worked.
Then I wondered if Cut/Paste/Copy weren't somehow reserved. So I changed the menu text to read "Copy chart","Cut chart", "Paste chart". Bingo. My menu items now worked.
After the fact I decided to check out the documentation (ContextMenuItem), and in fact there are quite a few reserved words:
Save
Zoom In
Zoom Out
100%
Show All
Quality
Play
Loop
Rewind
Forward
Back
Movie not loaded
About
Show Redraw Regions
Debugger
Undo
Cut
Copy
Paste
Delete
Select All
Open
Open in new window
Copy link
Even worse, the following:
Adobe
Macromedia
Flash Player
Settings
Are not only reserved menu item names, but additionally they cannot appear anywhere in a menu item name, even in combination with other text. So "Chart Settings" is out. A bit draconian if you ask me. I assume all of this is meant to prevent spoofing and confusion on the part of the users, which I understand, but a run-time warning would have been nice.
Comments