Can anyone answer as to whether this is a bug, or that I have to modify my
code in some way as to set the event mask such that my handler is called
after clear().

Just wondering what I should be doing.


On 9/26/07 3:08 PM, "Hal Hildebrand" <[EMAIL PROTECTED]> wrote:

> In the doc, it says to use the JessEvent.CLEAR to re-set up your event mask
> on the engine (section 10.11 in the 7.0p1 manual).
> 
> "One added wrinkle: note how the handler for JessEvent.CLEAR sets the event
> mask. When (clear) is called, the event mask is typically reset to the
> default. When event handlers are called, they have the opportunity to alter
> the mask to re-install themselves. Alternatively, they can call
> removeJessListener() to unregister themselves."
> 
> The example shown is:
> 
>       case JessEvent.CLEAR:
>         Rete engine = (Rete) je.getSource();
>         int mask = engine.getEventMask();
>         mask |= defaultMask;
>         engine.setEventMask(mask);
>         // MyGUI.clearDisplay(
>         break;
> 
> What I found out is in the Rete.clear() method:
> 
>    broadcastEvent(JessEvent.CLEAR, this, null);
>     setEventMask(0);
> 
> So, whatever handlers are doing when handling CLEAR, the event mask is going
> to be zero'd out after they set it.
> 
> Is this a bug, or is there another mechanism that I can use to reset the
> event mask when the Rete is clear'd?
> 
> 
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------
> 


--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to