General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Element List and Attribute Inspector

  • jrob61

    Element List and Attribute Inspector

    Participants 5
    Replies 6
    Last Activity 8 years, 10 months ago

    we have customizations in place for XMetal 5.5 that in essence hides the Attribute Inspector, StyleSheet Editor, and the like by use of defining a Override in our .mcr file. For example this hides the Attribute Inspector:

    Question is XMetaL 8 we are having trouble hiding the Attribute Inspector and Element List in script.  Just wondering if the “Override” feature is no longer supported, or the shortcut key F6 is no longer valid for the AttributeInspector, or is there a newer approach to hiding/overriding these types of menus?

    Reply

    jrob61

    Reply to: Element List and Attribute Inspector

    using XMetaL Author Essential 8.0, version 8.0.0.038

    Reply

    Derek Read

    Reply to: Element List and Attribute Inspector

    Your code (as shown) would not hide the Attribute Inspector, it directs the F6 key to a macro and the macro does nothing, the result being that pressing F6 would do nothing (and not open the Attribute Inspector).

    Is that what you mean?

    Reply

    Derek Read

    Reply to: Element List and Attribute Inspector

    I see what might be the issue. In previous releases both the F6 and Shift+F6 keys essentially did the same thing: open the Attribute Inspector and put focus into it. Because the UI has been altered to allow the Attribute Inspector (and other windows) to have additional behaviours the control is now more fine-grained in 8.0 and these shortcuts do slightly different things. The Attribute Inspector has additional states now, some of which combine:

    1. Visible / hidden (same as previous releases).
    2. Pinned / unpinned (this is new and allows the window to be hidden but slide out).
    3. Docked / undocked (same as previous releases but including more possibilities for positioning when docked).

    Items 1 and 2 affect each other and result in a combination of 4 states (hidden + pinned, hidden + unpinned, visible + pinned, visible + unpinned — the first two look the same because you don't see the Attribute Inspector).

    F6 and Shift+F6 do slightly different things depending on the current state.
    F6 opens the Attribute Inspector or slides it out, unless it is already open, in which case it puts focus into it (so pressing twice will open and put focus into it).
    Shift+F6 does both (open + set focus).

    As with previous releases overriding F6 or Shift+F6 doesn't hide the Attribute Inspector, it merely overrides those actions associated with it. The user can still use menu and toolbar buttons to open the Attribute Inspector.

    The new user interface in 8.0 that provides the ability to position windows such as the Attribute Inspector in new ways defaults to having the Attribute Inspector and Element List unpinned on the right side of the application. So, but default they are visible but unpinned. This means that hovering over their “tab” will slide them out.

    Reply

    Derek Read

    Reply to: Element List and Attribute Inspector

    If you can describe your exact requirements I can try to help you get things working. Or alternatively, submit a copy of your customization to XMetaL Support along with a description of what the important behaviours you have modified are (this would likely be the most efficient thing to do).

    Reply

    jrob61

    Reply to: Element List and Attribute Inspector

    If you can describe your exact requirements I can try to help you get things working. Or alternatively, submit a copy of your customization to XMetaL Support along with a description of what the important behaviours you have modified are (this would likely be the most efficient thing to do).

    We distribute our customized .mcr found in Author/Startup to several users; ideally, we are trying to override the basic XMetaL features out of the box to control what the end user can gain access to.  We are in process of upgrading from 5.5 Essential to 8.0 Essential and noticing our .mcr is not behaving as we would like.

    1 – the attribute inspector is now accessible to the user and we want to hide it using script/macro in our .mcr, but can't seem to find the exact syntax.  Also, need to do the same with the Element List – hide it and not allow any shortcut keys to gain access.
    2 – we also create a Repository toolbar and assign its .Caption with the path of the opened document, but now the toolbar shows a drop-down arrow, but with no text?  The tooltip does show the path however.

    //create a command toolbar to show the current documents repository
    Application.CommandBars.Add(“Repository”, 2);
    var cmdBar = Application.CommandBars.item(“Repository”);

    for (i=cmdBar.Controls.count; i>0; i–) {
    cmdBar.Controls.item(i).Delete();
    }

    var newOption = cmdBar.Controls.Add(5);
    newOption.Caption = “Repository: “;
    newOption.BeginGroup = false;

          if (Application.CommandBars.Item(“Repository”).Visible == true)
            Application.CommandBars.Item(“Repository”).Controls.Item(1).Caption = “Repository: ” + Application.ActiveDocument.CustomDocumentProperties(“REPOS”).value;

    Reply

    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

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support