PDA

View Full Version : CUI - I wonder why these things happen



rkmcswain
2006-05-11, 09:45 PM
Right click on a command in the command list, choose Delete. If the command is unreferenced, meaning that it is not in a pull down menu, toolbar, etc. then it will be deleted as expected. However, if the command is referenced in a pull-down menu, toolbar, etc., it will not be deleted. There is no message, warning or anything to tell you this. I wonder why there is not a YES NO dialog saying something like "Deleting this command will delete all "X" references in this CUI file. (where "X" is the number of references. At the very least, you should get a message saying WHY it isn't deleting the command.


If you delete a command from the menu, that's it, nothing else happens. If you are deleting a command from a menu, you either want the command deleted from the CUI completely or you are going to place it somewhere else. The CUI editor always assumes the latter. I wonder why it doesn't ask you "Do you want to delete this command from the command list also?" (Only in the case where this is the last reference in the menu file. If there are other references, then I wouldn't want that question). If you delete a entire sub menu for example, then you are left with a bunch of orphaned commands in the CUI. How do you find these to delete them?


The whole CUI thing seems to be based on references. If you click an item in the menu, and change anything other than the Name it changes in both places (the menu and the command list). This is how I would expect it to perform. However, if you change the Name, it does not change the name of this command in the Command List. I wonder where the reference went in this case. If the pull-down menus reference items from the command list, why don't they change when I change the same item in the command list.

RobertB
2006-05-12, 06:14 PM
Right click on a command in the command list, choose Delete. If the command is unreferenced, meaning that it is not in a pull down menu, toolbar, etc. then it will be deleted as expected. However, if the command is referenced in a pull-down menu, toolbar, etc., it will not be deleted. There is no message, warning or anything to tell you this. I wonder why there is not a YES NO dialog saying something like "Deleting this command will delete all "X" references in this CUI file. (where "X" is the number of references. At the very least, you should get a message saying WHY it isn't deleting the command.Well, sometimes it is deleted, and that leads to the dreaded "Unreferenced menu macro" bug (at least back in 2006). So in 2007, perhaps the editor locks that down a bit tighter. Although some feedback as you expressed it would be nice.


If you delete a command from the menu, that's it, nothing else happens. If you are deleting a command from a menu, you either want the command deleted from the CUI completely or you are going to place it somewhere else. The CUI editor always assumes the latter. I wonder why it doesn't ask you "Do you want to delete this command from the command list also?" (Only in the case where this is the last reference in the menu file. If there are other references, then I wouldn't want that question). If you delete a entire sub menu for example, then you are left with a bunch of orphaned commands in the CUI. How do you find these to delete them?Make a note of the element IDs before you delete the references, then you can search for them. (Tedious, I know.)


The whole CUI thing seems to be based on references. If you click an item in the menu, and change anything other than the Name it changes in both places (the menu and the command list). This is how I would expect it to perform. However, if you change the Name, it does not change the name of this command in the Command List. I wonder where the reference went in this case. If the pull-down menus reference items from the command list, why don't they change when I change the same item in the command list.The reference is actually by the element ID, not the name property. I like the ability to change the name of the item on the menu without changing the name of the command. Sometimes I need to use a name on the menu to provide an accelerator key and the original command name won't work. But I don't want the actual command name to be changed. Also, the name property on the menu element is actually a separate property, to permit you to add the accelerator (or other other special characters) that only apply to pull-down menu items.

rkmcswain
2006-05-12, 06:28 PM
The reference is actually by the element ID, not the name property. I like the ability to change the name of the item on the menu without changing the name of the command. Sometimes I need to use a name on the menu to provide an accelerator key and the original command name won't work. But I don't want the actual command name to be changed. Also, the name property on the menu element is actually a separate property, to permit you to add the accelerator (or other other special characters) that only apply to pull-down menu items.


I can buy your last explanation. It's just a pain when you want to simply rename a menu item and update the name of the command simultaneously.

Maybe the CUI needs to honor the EXPERT sysvar and display some warnings, notices for us CUI rookies...

The first two still bite :banghead:

rkmcswain
2006-05-23, 02:53 PM
One more thing... Why do deleted items remain in the CUI file?

I deleted an entire menu branch with all it's "sub-items" - and it's nowhere to be found in the CUI editor, or in the visible menu - this is expected, right?

However, I was getting an error message upon loading this menu. An examination of the CUI file in an XML editor reveals that this entire branch of the menu is still in the file. What is the purpose?

In one respect, I think this may be a good idea, sort of like commenting out a section in the MNU file, but then again - without an XML editor what good is this hidden menu section doing me?