General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Assets Tab: Last Resort?

  • pmasal

    Assets Tab: Last Resort?

    Participants 4
    Replies 5
    Last Activity 7 years, 11 months ago

    I understand that the Assets tab is no longer available (nor supported) in XMetaL 8. So at McAfee we're trying to replace our Assets tab with something compatible. We're currently using it to insert XML tables, as we have several table models and visual depictions (with drag and drop into XML content) are important to authors.

    I have tried the following, but receive a message indicating that Ajax calls aren't able to get control of the file system. It shows an Assets tab, but the contents of the My Assets folder are not shown in Resource Manager.

      ResourceManager.AddTab(“Assets”, “Shell.Explorer.2”);
      var msie = ResourceManager.ControlInTab(“Assets”);
      msie.Navigate(“file:///c:/Program Files/XMetaL 8.0/Author/Assets/My Assets”);
      ResourceManager.SelectTab(“Assets”);
    ]]>

    Given that the above is not possible due to Windows limitations, have folks developed any alternatives? I could write macros that are selectable from the menu bar, but they won't show visual depictions of the XML tables before they are inserted, so there will be some trial/error on the part of authors, especially new ones. Thanks for any suggestions you can give!

    Paul Masalsky
    McAfee

    Reply

    Derek Read

    Reply to: Assets Tab: Last Resort?

    You can add the Assets tab and that should restore its mostly broken functionality by simply calling the first line in your code, as far as I know.
    I believe it is a reserved tab, or more specifically one that the software should still recognize. The rest of your code should not be necessary I don't think. All the old code is still in there, it just hasn't been maintained or made to work with the new security functionality in Windows.

    I would not recommend that though because with newer versions of Windows (newer than XP, like XP SP2 or Windows 7 / 8) you will probably need to turn UAC off. You might also need to specifically allow write access to C:Program Files depending on what features you are using (those are the main reasons this tab stopped being supported).

    The alternative, which I would recommend, would be to create a new tab with a different name. If whatever it is loading writes to the file system then it would be easiest to place it outside of C:Program Files since only installers can write there unless your turn UAC off and make it writable. On Windows 7 you could put it into C:ProgramData or somewhere inside %appdata%. I have even seen some clients host pages on a website and load them from there.

    Note my assumption is that you are not using the original contents of the Assets folder as those have not been maintained since we stopped supporting the feature.

    Presumably you have written something (the HTML files being loaded) that does what you need?
    If not perhaps someone else has (as you are hoping) and will answer here.

    Reply

    Derek Read

    Reply to: Assets Tab: Last Resort?

    Sorry, slight mistake. Ideally your code should be this:

    //XMetaL Script Language JScript:
    ResourceManager.AddTab(“Assets”,””);

    However, I've just tested that with the current release (9) and though that will add the tab, with 9 it is now completely broken. It doesn't automatically load up any of the Assets stuff. I have not tested 8 yet, but presumably the feature was still partially alive in that release and the code above might still have worked.

    Ultimately (since the feature is now really gone) I guess it is best to use the approach you originally suggested (add the tab and specifically load the MS webbrowser control into it then load whatever HTML pages you have designed to replace the original functionality), but I would still avoid naming the tab “Assets” just in case there is some lingering code around that recognizes that tab name.

    With a future version we may begin cleaning up these broken files, and the Assets folder may be completely removed from the installation. We tend to avoid removing things from the installation in case people are still using them for some reason (perhaps one we did not originally intend) but in this case the feature has been deprecated for 4 versions and completely unsupported for 3.

    Are you using some of the files from inside the Assets folder?

    Reply

    pmasal

    Reply to: Assets Tab: Last Resort?

    Looking a lot better now Derek, thanks!!

    * ResourceManager.AddTab(“Assets”,””); would not work in XMetaL 8 either. Returns a message saying tab could not be loaded.
    * Your suggestion about displaying the html splash page directly worked great. It involved renaming the Assets tab and changing this line:
      msie.Navigate(“file:///c:/Program Files/XMetaL 8.0/Author/Assets/My Assets/fxindex.htm”);

    Only thing is, we were able to drag and drop the table depictions in fxindex.htm directly into xml (called out separately in imbedded .txt documents) into the content, which now I cannot do. I'll have to look into what's happening there.

    Thanks again for the help!!
    Paul Masalsky
    McAfee

    Reply

    pmasal

    Reply to: Assets Tab: Last Resort?

    Just a quick follow up, looks like the attached fxitems.xml was customized for us, to enable the drag/drop functionality.

    Reply

    XMetaLOldTimer

    Reply to: Assets Tab: Last Resort?

    The correct way to restore the Asset tab, which I tested on my 9.0 installation on Win7-64 with MSIE 9.0, is via a couple of INI variables:

    show_assets_by_default=true
    user_setting_mode=default

    The first INI variable was introduced in v8.0 and defaults to false.  The second INI variable defaults to “per_user” and disables users from being able to create new assets via drag'n'drop.  Changing it to “default” will permit the creation of assets but that operation will only succeed if the Assets folder is located in a place where programs can freely write without UAC intervention.

    Regards,
    Addam

    Reply

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

Lost Your Password?

Products
Downloads
Support