Oops, forgot the attachment, here it is... -+- JW -+-
2009/12/2 Jan Willem Lokin <[email protected]>: > In the JessWiki I found some info about how to use Java5 enums in > Jess. It turns out that it works OK with plain Jess facts, as > illustrated by enum2.clp in the attached archive, which produces the > output that I expect. However, the behavior is mysteriously different > when I use shadow facts instead. In that case I get an error: > > Jess reported an error in routine modify > while executing (modify ?q (bell MyEnum.BIM)) > while executing defrule MAIN::change-to-BIM > while executing (run). > Message: Error setting slot value. > Program text: ( run ) at line 23 in file enum3.clp. > > Nested exception is: > Can't convert 'MyEnum.BIM' to required type pkg.MyEnum > > The error disappears when I parenthesize the offending 'MyEnum.BIM', > but that still won't produce the expected output. > > Any help is appreciated, since I am using Jess in a Java5 application > that makes frequent use of enums. > > -+- JW -+- >
enum23.tar.gz
Description: GNU Zip compressed data
