Home Forums General XMetaL Discussion XMetaL 8: Is it possible to override Table menu commands? Reply To: XMetaL 8: Is it possible to override Table menu commands?

Derek Read

Reply to: XMetaL 8: Is it possible to override Table menu commands?

You have written code that removes the Table > Insert Caption item and replaces it with your own item that runs your own macro, correct? That's what you need to do to do if you want to do something special with that menu item that is different from what it already does. The resulting table model still needs to be CALS or HTML though.

My suggestion that you might need to use formatGraphicTable() would be inside the macro that is called when the user selects that menu item. Due to their complexity (the underlying XML structure does not match 1:1 with what you see on screen in a logical order) table rendering is handled separately from the rest of the rendering in a document. I guess its actually more complicated than that, but essentially the issue is that if you build and insert a table using script, or modify portions of an existing table using script, you sometimes need to tell XMetaL Author to re-render the entire table. If whatever your script is doing causes the table to render oddly then calling this API will get the whole thing to render again, and if it is valid XML and follows the particular table model, it should render correctly.

Reply

Products
Downloads
Support