On 02/20/2015 11:04 PM, Jeff Hooker wrote:

Has the nature of the XXE.close command changed between 5.4.1 and 6.0.0?
I can find no reference to any such thing in the “Changes” list, and the
reference in the command guide is also unchanged.

The following macro works in 5.4.1 inasmuch as it saves, closes, and
reopens the active document:

<macro>
<sequence>
<setvariable="url"expression="%d"plainString="true"/>
<commandname="XXE.save"parameter="[ifNeeded]"/>
<commandname="XXE.close"/>
<getexpression="$url"/>
<commandname="XXE.open"parameter="%_"/>
</sequence>
</macro>

In 6.0.0, however, it dies at the XXE.close command. Is there a reason
for this?

In itself, command XXE.close has not changed between v5 and v6. It's XXE v6 internals which have changed *substantially*.

I'm sorry but there is no way to make you macro-command work as is in XXE v6. Reason:

After invoking "XXE.close", the document view hosting your macro command is detached from XXE and thus, has no longer access to XXE and to its "XXE.open" command.

Note that if you rewrite your macro as follows, it will work just fine in XXE v6:

---
<command name="reopenDoc">
  <macro>
    <sequence>
      <command name="XXE.save" parameter="[ifNeeded]"/>
      <command name="XXE.open" parameter="[reopen]"/>
    </sequence>
  </macro>
</command>

<binding>
  <keyPressed code="F4" />
  <command name="reopenDoc" />
</binding>
---


--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to