Xul listitem command attribute not working?
I made this sample and it just doesn't work:
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <commandset> <command id="cmd_dump" oncommand="dump('ok');" /> </commandset> <vbox style="background:#FFFFFF;" flex="1"> <spacer flex="1" /> <hbox pack="center"> <listbox flex="1"> <listitem label="Test1" command="cmd_dump" /> <listitem label="Test2" command="cmd_dump" /> </listbox> </hbox> <spacer flex="1" /> </vbox> </window>
How to make it work?
Typically, lists are used to provide one or more options, rather than a list of actions. As far as I can tell from your question, you provide some kind of customization user interface, in which case you have several options:
. , , ( ).
, Firefox ( XULRunner)? , , , , , , ?
, : #xul irc.mozilla.org. .
I did not work for me either. But the creation type = checkboxstarts command. You can get rid of the checkbox using absolute positioning and negative margins, but it's an ugly hack.
type = checkbox
command
It would be best to listen to the event click <listitem>in Javascript.
click
<listitem>
As Cedric said, it could be a mistake, although an example of controllers works - MDC .
Source: https://habr.com/ru/post/1783915/More articles:Clarify the use of the WINHTTP_STATUS_CALLBACK function, for SSL status codes - winhttpIs it possible to use the Audio chat service from Google in my web application? - phpSort 3 lists according to their values ββ- c #numpy arange ΠΈ Π³Π΄Π΅ - pythonhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1783914/how-to-convert-non-english-characters-to-english-using-javascript&usg=ALkJrhgaEVCSxlLwQ3f8vUxlFWPL_lKooQCan you start the mouse so that it doesn't fire in IE on DOMready? - jqueryvisual analysis of web pages in ruby ββ- domI need: availability => true on my model, if I have: length => {: minimum => 1 ,: maximum => 255}? - ruby-on-rails-3Is there a way to block copy / paste from a text view? - objective-cAndroid Cursor.registerContentObserver () - androidAll Articles