Although it's obviously a question about your Jess application, it's
not really a Jess question, per se; it's a question about what events
are sent by Swing components, and when. Jess has no special knowledge
of any of this, of course; you have to use your own Java programming
knowledge to make sure the right thing happens.
Which is a long way of saying yes, sure you can do -- but then you
have to figure out how to make the program work again afterwards! I
would recommend adding "printout" function calls to your event
handlers so that you know exactly when each one is called, and using
the "watch all" function so that you can see the effect each has on
the Jess engine.
On Apr 6, 2009, at 12:08 PM, ANA TANASESCU wrote:
Dear Ernest,
I read your example with PC Repair Assistant from your book Jess in
Action. At the final of the chapter 13 you have added a combobox and
a button that generates the event associated with the selection of
an item from the combobox.
I have tried to remove the button (I mean ?*acombo-ok*) and to add
the ActionListener direct to the combobox. (?*acombo*).
(?*acombo* addActionListener ?handler)
The result is that one single rule will be activated the first
regarding the architecture of the computer.
What shall I do? Can I add a handler to a combo box with a list of
items that is variable?
Best regards,
Ana
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected].
--------------------------------------------------------------------