Hi,
I have a text mode <ProjektID ProjektIDRef="xxx">TEXT</ProjektID>
in css I bound a command button on this node to execute the following
command:
<!-- show a generated Project-menulist via pick
ask maple-server and insert the id in attribute
ask maple-server for a the associated name of the id
and insert the name in the text-field -->
<cfg:command name="getprjrefid">
<cfg:macro>
<cfg:sequence>
<cfg:command name="selectNode" parameter="self"/>
<cfg:command name="run" parameter='/usr/local/bin/IF2mapleSocket
"with(PJVerw)"'/>
<cfg:command name="run" parameter='/usr/local/bin/IF2mapleSocket
"get_projektlist_xxe_pick_arg()"'/>
<cfg:command name="pick" parameter='%_'/>
<cfg:command name="putAttribute" parameter="ProjektIDRef %_"/>
<cfg:choice>
<cfg:sequence>
<cfg:command name="selectText"/>
<cfg:command name="delete" parameter="[implicitElement]"/>
</cfg:sequence>
</cfg:choice>
<cfg:command name="get" parameter="[implicitElement] ./@ProjektIDRef"/>
<cfg:command name="run" parameter='/usr/local/bin/IF2mapleSocket
"prjid2prjname(%_)"'/>
<cfg:command name="insertString" parameter="%_"/>
</cfg:sequence>
</cfg:macro>
</cfg:command>
IF2mapleserver is a shell-tool to make a conection to a socket.
There 3 steps in the macro:
1. get a list (via server)
pick an item from the list and insert the ID in the
attribute from the node
2. CLEAN the text-field
3. connect again to the server and get the name of the
priviusly selected ID
insert this name in the text-field:
This macro does not work very well, somtimes (dependig on the
previusly selected nodes otherwise it works not, somtimes it works?
My questions are:
1.) is there a simpler way to delete the text-node before inserting new text
2.) why this macor works only sometimes?
With kind regards,
Ulrich Thye