Home Forums General XMetaL Discussion Element List and Attribute Inspector Reply To: Element List and Attribute Inspector

Derek Read

Reply to: Element List and Attribute Inspector

So the basic logic for this snippet is:

1. Add a menu called “Repository” (this part of your code doesn't check to see if one exists already, that might be a good idea to avoid duplicates being created, but maybe that is done earlier).
2. Remove all the menu items from inside that menu (not sure why at this point since it was just created and therefore should contain nothing, but maybe I'm missing something).
3. Add a menu item called “Repository: ” (not connected to any macros at this point).
4. Change the caption text for the menu item created in 3 to include a custom value associated with the current document (using CustomDocumentProperties, which must have been set elsewhere).

There must be quite a bit of code we're not seeing here. It may also function differently depending on the timing of the event it is running inside of. But this code also does not seem to have much to do with your original question. I've just retested creating several macros and assigning the shortcut keys F6 and Shift+F6 to them and they are working as expected and overriding those built-in shortcuts. Presumably you have one assigned to Ctrl+Shift+I to stop the Element List from opening as well and I've tested that too.

I think it would most efficient to submit a support case through XMetaL Support and include more of your code, something that can be loaded up and run through a script debugger (like Visual Studio).

Reply

Products
Downloads
Support