I am trying to make some simple changes to the XXE user interface for a
particular document (let's call it mydoc). The following xxe_gui file:
<?xml version='1.0' encoding='UTF-8'?>
<gui xmlns="http://www.xmlmind.com/xmleditor/schema/gui"
xmlns:gui="http://www.xmlmind.com/xmleditor/schema/gui">
<include location="xxe-gui:app/default.xxe_gui" />
<action name="mydocSaveAction" label="_Save"
icon="xxe-gui:app/icons/saveAction.gif" accelerator="mod S">
<context editingContextSensitive="false">
<configuration name="mydoc">
<command name="mydoc.save"/>
</configuration>
<default>
<class>com.xmlmind.xmleditapp.kit.part.SaveAction</class>
</default>
</context>
</action>
<action name="mydocCloseAction" label="_Close"
icon="xxe-gui:app/icons/closeAction.gif" accelerator="mod shift W">
<context editingContextSensitive="false">
<configuration name="mydoc">
<command name="mydoc.close"/>
</configuration>
<default>
<class>com.xmlmind.xmleditapp.kit.part.CloseAction</class>
</default>
</context>
</action>
<menu name="fileMenu" label="_File" helpId="fileMenu">
<action name="newAction"/>
<action name="openAsTemplateAction"/>
<action name="openCopyAction"/>
<separator/>
<action name="openAction"/>
<separator/>
<action name="mydocCloseAction"/>
<separator/>
<action name="mydocSaveAction"/>
<action name="saveAsAction"/>
<action name="saveCopyAction"/>
<separator/>
<action name="pageSetupAction"/>
<action name="printAction"/>
<separator/>
<action name="quitAction"/>
-
<!--
No need to add a separator here. Separator is dynamic too.
-->
<menuItems name="recentFilesMenuItems"/>
</menu>
<menu name="windowMenu" label="_Window" helpId="windowMenu">
<action name="precedingWindowAction"/>
<action name="followingWindowAction"/>
<menuItems name="windowListMenuItems"/>
</menu>
<layout>
<insert />
</layout>
</gui>
is intended to:
- remove the Save All and Close All functions
- move the Close function from the Window menu to the File menu
- redefine the actions of SaveAction and CloseAction for mydoc documents.
Suppose that the definitions of mydoc.save and mydoc.close in the XXE
configuration file are:
<cfg:command name="mydoc.save">
<cfg:macro>
<cfg:sequence>
<cfg:command name="alert" parameter="Saving file" />
<cfg:command name="XXE.save"/>
</cfg:sequence>
</cfg:macro>
</cfg:command>
<cfg:command name="mydoc.close">
<cfg:macro>
<cfg:sequence>
<cfg:command name="alert" parameter="Closing file" />
<cfg:command name="XXE.close"/>
</cfg:sequence>
</cfg:macro>
</cfg:command>
The Save function works (an alert is displayed, then the file is saved). The
Close function doesn't (an alert is displayed, then nothing happens). Why
does the Close function not work?
Regards
Kevin Flynn
Birdstep Technology ASA
Oslo, Norway
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20051202/025a88c3/attachment.htm