Hello again,<br><br><div><span class="gmail_quote">On 2/19/07, <b class="gmail_sendername">Marcus Ilgner</b> &lt;<a href="mailto:marcus.ilgner@gmail.com">marcus.ilgner@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi list,<br><br>I&#39;m having problems using Enums in the LHS of my rules.<br>Running this rule<br><br>&gt; rule &quot;demo&quot;<br>&gt;&nbsp; &nbsp;&nbsp; when<br>&gt;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $t : Transition( from == PlayerCharacter.STATE_IDLE,<br>&gt;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; to == 
PlayerCharacter.STATE_GENERATING,<br>&gt;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; state != TransitionState.REQUESTED )<br>&gt;&nbsp; &nbsp;&nbsp; then<br>&gt;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(&quot;The state is: &quot; + $t.getState());<br>&gt; end<br><br>
<br>
actually results in the output<br>&gt; The state is: REQUESTED<br><br>Am I doing something wrong?<br>I&#39;m currently using the experimental 3.1.0M1 release.</blockquote><div><br>Since it seems that I&#39;m the only one who experiences this odd behaviour, I have put together a simple self-contained test case:
<br><a href="http://dude-development.de/enumtest.java">http://dude-development.de/enumtest.java</a><br></div>This example, running on Version 3.1.0-M1, always prints every value, even those that are equal to VALUE1. If I change the comparator to equal, no value gets printed.
<br>Is it me who&#39;s doing something wrong or is it really a bug? Judging from previous posts and what I read on the JIRA, Enums should work like that, don&#39;t they?<br>I&#39;d be grateful for any hints.<br><br>Best regards
<br>Marcus<br><br><br></div>