Forum Replies Created

  • paorear

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

    Participants 0
    Replies 22
    Last Activity 8 years ago

    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.

    No – I'm simply trying to find a way to make the default behavior work correctly. All the other standard Table menu items work fine for us and this one almost does except for the behavior I described earlier. If I could find a way to replace the standard menu item I would, but using the CommandBars approach only affects the Tables toolbar and not the menu. And there is no Insert Caption button in the toolbar either.

    For example, my C# code that is similar to what you'd do in JavaScript looks like this:

    var tblMenu = HostApplication.CommandBars[“Table”]; // get the Table command-bar

    var cmdTableInsertCaption = tblMenu.Controls.item[4];
    cmdTableInsertCaption.Delete();

    This successfully removes an item from the Table command bar, but has no effect on the menu. If you see earlier in our thread here, I tried iterating over the controls in the Table command bar to see what each one was and I listed them all out. Insert Caption isn't among them, and regardless, deleting items from this command bar has no effect on the menu no matter which control I delete. It only affects the toolbar.

    Paul

    Reply

    paorear

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

    Participants 0
    Replies 22
    Last Activity 8 years ago

    – using formatGraphicTable sounds like it would be a great option. Unfortunately, there doesn't seem to be a way to trap basic document edit events or XMetaL Table menu events. In other words, there would be no obvious way to trigger my code to run when the standard XMetaL Table =>Insert Caption menu item is selected. Or am I missing something?

    P.

    Reply

    paorear

    Reply To: Undo/Redo clearing of a specific item

    Participants 0
    Replies 22
    Last Activity 8 years ago

    Thanks for that explanation, Derek! I can see how this derives from the Document/View MFC model of things. I've not heard of those BeginMutation and EndMutation APIs – do you have a reference for those?

    You're probably not aware just through my forum posts – Mag knows how my team has done some pretty extensive customization of XMetaL for our purposes via .NET – quite successfully. The blending of the technologies via JavaScript is quite an interesting feat, but still leaves some gaps with what we are able to do at times.

    Paul O'Rear

    Reply

    paorear

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

    Participants 0
    Replies 22
    Last Activity 8 years ago

    Thanks Derek – basically, I'm just looking for a programmatic means that would let me ideally override the standard Table->Insert Caption menu item and failing that a programmatic means to disable it.

    I have not found any way via macro documentation or samples that would let me do either.

    Paul

    Reply

    paorear

    Reply To: Undo/Redo clearing of a specific item

    Participants 0
    Replies 22
    Last Activity 8 years ago

    +1 on this request and not limited to XMAX. We could use this XMetaL 8 (and 9 assuming it's not there, too). It would be great to have access to the Undo list in general.

    Undo captures items like View switches, which for our users is somewhat unintuitive – a View switch is not an edit action. From another angle, we have a mechanism that provides a PI based comment UI that inserts and deletes comments in the content that are invisible in the Tags On view. Unfortunately, if a user inserts a comment and then hits Undo, it rolls back our content edit, but there is no mechanism for tracking this undo 'event' in order to update our UI (unless I'm missing something).

    Being able to immediately remove certain types of actions from the Undo buffer would enable us to improve our user's experience.

    Paul O'Rear

    Reply

    paorear

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

    Participants 0
    Replies 22
    Last Activity 8 years ago

    I saw a reply to this in email, but it doesn't appear to be showing up in the forum. The text of the reply was:

    What is your document type? I'm guessing you are trying to customize the DITA authoring functionality and not creating a customization for your own schema?

    If it is DITA then you will have trouble doing this as our DITA authoring customization heavily customizes the built-in Table menu, it also provides custom dialogs for various types of Table editing specific to DITA (we have built-in support for CALS but all of the other types required custom dialogs), and it also customizes quite a few of the other standard menus.

    If you want to try to make changes to these things (I cannot recommend that) you would need to start reading all the JScript code our developers have written, and possibly some code in XFT files as well. You would then need to make your changes in there directly, or (better) override the JScript prototype functions they have written (where those exist). Keep in mind that you would need to retest your changes with each release as this part of the system is considered “closed” and making changes to it is unsupported. In addition to not being documented, or supported by XMetaL Support, our developers do not try to keep any of this functionality backward compatible (as they do with our APIs for example).

    If you are trying to fix something it would be best to submit a case to XMetaL Support describing the issue so that it can be addressed in a future release if it makes sense to do so.

    If you are trying to add a feature it might be useful for other clients, and in that case it would also make sense to submit a case to XMetaL Support describing what you want to add so that it can be considered for a future release.

    We are not using DITA and have our own schema, but we are reusing the same table tags which work well overall with the built-in tools. However, when a user selects Insert Caption (even though we have a

    element), XMetaL effectively inserts an invisible element and the cursor is placed before the first cell of the table. If the user types it appears as if nothing is happening. If you switch to Plain Text view, you see a element was indeed inserted and any typing that may have happened is getting into the value of the element. If you then switch back to Tags On view, the element appears. It's this generally bad user experience we're trying to address.

    If instead of selecting Insert Caption from the table menu, a user simply inserts a element from the Element List all works as expected.

    This is a somewhat specific scenario, but overall, it would be really useful to be able to enable/disable/remove menu items from any of the standard menus – this is something anyone extending or customizing XMetaL could benefit from. We've been able to add our own menu and do some nice stuff there, but have little control over any of the other menus.

    Thank you!

    Reply

    paorear

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

    Participants 0
    Replies 22
    Last Activity 8 years ago

    Thanks Derek – I tried your approach and found that I was able to delete some Table toolbar members that way, however, the Table menu options appear to be managed separately.

    Through code I was able to iterate over the Table CommandBar and found 18 controls. Querying the DescriptionText for each I was able to find controls for the following:
    1) Insert Table
    2) raises an exception when accessing DescriptionText
    3) Insert Row Above
    4) Insert Row Below
    5) Delete Row(s)
    6) Insert Column Left
    7) Insert Column Right
    8) Delete Column
    9) Move Row Up
    10) Move Row Down
    11) Move Column Left
    12) Move Column Right
    13) Merge Cell Right
    14) Merge Cell Left
    15) Merge Cell Up
    16) Merge Cell Down
    17) Split Cell into Rows
    18) Split Cell into Columns

    Note particularly that Insert Caption is not present, but also that the Table menu and Table toolbars each have items that are not in the other.

    Should I conclude that it is not possible to delete or otherwise modify the Insert Caption menu item?

    Note that control #2 throws an exception when trying to access its properties, but even if I try to delete #2, I see no change.

    I've even begun looking at Windows API approaches to deal with this, but it's almost impossible to query much of anything from these Control Bars from the WinAPI as well.

    Paul O'Rear

    Reply

    paorear

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

    Participants 0
    Replies 22
    Last Activity 8 years ago

    Hi Derek – no, I think I was basing that off of another thread where it was implying that you could override any of the default menu options with a macro by effectively using the same name. However, it was only showing File menu options. I was taking a guess at what an equivalent Table menu macro might be.

    The Delete method appears to only apply to a CommandBar and not to a CommandBarControl. I tried changing the Visible property of any of the 18 CommandBarControls in the Table CommandBar, but it did not seem to have any effect. I was trying to do this on ApplicationOpenComplete – should that work?

    Paul

    Reply

    paorear

    Reply To: XMetaL 8.0 Enterprise: Internal browser/preview issue

    Participants 0
    Replies 22
    Last Activity 8 years, 1 month ago

    I found the solution to the issue via this blog post:
    [url=http://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version]http://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version[/url]

    and this documentation:
    [url=http://msdn.microsoft.com/en-us/library/ie/ee330730(v=vs.85).aspx]http://msdn.microsoft.com/en-us/library/ie/ee330730(v=vs.85).aspx[/url]

    Apparently, the web browser control when hosted in an application defaults to the IE 7 rendering mode. There's no easy way to say “use the latest version” when hosting the control. You can, however, specify a simple registry entry on a per .exe basis that then effectively enables the desired emulation mode for the host application.

    [HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION]
    “xmetal80.exe”=dword:00002af9

    The problem in my case was that we were leveraging some HTML 5 CSS features that were not supported in IE 7. Making this tweak solved everything.

    Hopefully this may help others as well.

    Paul O'Rear

    Reply

    paorear

    Reply To: XMetaL 8.0 Enterprise: Internal browser/preview issue

    Participants 0
    Replies 22
    Last Activity 8 years, 1 month ago

    Thanks Addam – I was suspecting that with the firewall, too, but have not been able to isolate anything like that yet.

    Paul O'Rear

    Reply

    paorear

    Reply To: Trap links in Page Preview?

    Participants 0
    Replies 22
    Last Activity 8 years, 8 months ago

    No – what I'm describing is that a user is looking at a page in Page Preview. This is XML rendered to HTML. That page in preview has a link to another XML “topic” that is in our CMS, that will ultimately be transformed to HTML as well.

    So the user previews the page – clicks on a link to another page that is not local, or transformed yet. I'd like to catch that request, pull down the xml topic from our CMS and transform it on the fly.

    This is using our own custom CMS, and we own all the other logic for transforming XML to HTML otherwise for the standard page preview scenario. We currently do something what you describe when we preview now – where we do the transforming process and then pass our own temp .html file back to the preview view.

    We are working with our own schema as well.

    I've also been interested in getting more information about the CMS integration toolkit, but have not been successful in finding the route to get that information yet.

    Thanks Derek!
    Paul

    Reply

    paorear

    Reply To: Trap links in Page Preview?

    Participants 0
    Replies 22
    Last Activity 8 years, 9 months ago

    The user would be clicking on a link to another topic in our CMS that is not transformed into HTML on the local machine. The idea would be to intercept the link request, pull the topic from the CMS and transform on the fly and then pass back the URI to the newly transformed and linked topic to the Page Preview.

    P.

    Reply

    paorear

    Reply To: Trap links in Page Preview?

    Participants 0
    Replies 22
    Last Activity 8 years, 9 months ago

    To clarify, I don't mean On_Before_Document_Preview, I'm thinking in the context of an already previewed page – e.g. capturing the Navigate() event of the underlying browser control.

    P.

    Reply

    paorear

    Reply To: hide children in Element List (XMAX)

    Participants 0
    Replies 22
    Last Activity 8 years, 10 months ago

    Super – thank you!

    Reply

    paorear

    Reply To: Info: Viewing and editing <alt> elements in images

    Participants 0
    Replies 22
    Last Activity 8 years, 10 months ago

    [XMetaL Authoring Essentials 8]

    Thanks Derek – I had read that other thread yesterday as well.

    Here's a scenario I'm trying to solve. I currently have the following working:

          XFT placeholder image

    Where the XFT is embedded and essentially just a graphic to show that an image would be displayed there at rendering time.

    In some scenarios, we have a child element that would make the image into a hotlink. e.g.
         

    In all these cases the data we track is in attributes of the tags themselves – not any value data between elements.

    Currently, I am unable to display the element in the editor, presumably due to the XFT that we have associated with the element. I tried defining the XFT as embedded and to be before element, but it didn't seem to have any impact either on where the XFT was displayed or whether the element would also be displayed. Is what I'm trying to do possible? or perhaps I just didn't quite get it defined and setup correctly.

    Reply

Products
Downloads
Support