Kevin Flynn wrote:
> 
> This binding:
> 
>  <binding>
>    <mouseClicked button="1" />
>    <command name="alert" parameter="left mouse key clicked"/>
>  </binding>
> 
> Does not seem to work if the user clicks on an "empty" element such as 
> an imagedata element. Is there any way to capture such an event 
> (clicking on an element that has no text node children)?
> 

The problem does not come from the fact that the element is empty (e.g. 
try this with an XHTML br element: it works fine). The problem comes 
from the fact that imagedata is styled as follows:

imagedata {
     content: gadget("com.xmlmind.xmleditapp.docbook.Graphic");
}

and com.xmlmind.xmleditapp.docbook.Graphic is a Gadget (AKA embedded 
control) which captures the *left* *mouse* *button*: press, release, 
click, double-click, etc.

Thus, if you style imagedata differently or if you use another mouse 
button (see below), it should work fine.

  <binding>
    <mousePressed button="3" />
    <command name="alert" parameter="Right mouse button pressed"/>
  </binding>

See also "Menu commands" 
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/menu.html




Reply via email to