Home Forums General XMetaL Discussion Customizing toolbars and related problems Reply To: Customizing toolbars and related problems

Derek Read

Reply to: Customizing toolbars and related problems

1) Does this issue occur with the current release?
These files are user files (which is why they are in %appdata%) and are written out every time XMetaL Author shuts down to reflect any changes the user might have made to the toolbars, so the fact that they are written out is expected. If you make changes to TBR files using an external editor while XMetaL Author is running those changes will always be overwritten for default.tbr and they will be overwritten for any TBR files associated with a particular schema if an XML file that uses that schema was open during that session.

2) If this is the application-level toolbar file (which is named default.tbr) then it will be saved and loaded from the folder you have specified. If it is document-level then it will be saved and loaded from %appdata%SoftquadXMetaL9.0gen.tbr

If you provide a TBR file with your schema then it is loaded from there the first time, but from then on it is saved to and loaded from the %appdata% folder listed above. These changes are meant to be done by end users customizing toolbars for their own environment. If you are planning to distribute toolbar changes to end users you really need to use the APIs provided for that (the CommandBars object) and create either a document-level customization for toolbars associated with specific docments, or an application-level customization for toolbars that will be available to all documents and when no documents are open.

3) Make sure you are creating an application-level macro if you want to use this event. Your MCR file needs to be in the Startup folder for it to be loaded as an application-level.