[rules-users] Drools beginner - unable to resolve method using strict-mode

Stefan Schuster stefan.m.schuster at gmail.com
Wed Apr 10 10:02:13 EDT 2013


Hi,

I'm new to drools, and I made my first steps using the very nice
video-tutorial "Build Pong in 13 minutes using JBoss Drools" found here:
http://www.youtube.com/watch?v=Omj4PR3v-nI

Eclipse shows building errors, but Pong start anyway. What does this error
mean?

in move.drl there is following rule:
*<rule "Move Bat Up" timer(expr: bat.speed, bat.speed) no-loop when*
*    ui : PongUI(  ready == true )*
*    ( KeyPressed( keyText == "A" ) and bat : Bat( playerId ==
PlayerId.PlayerOne, y > pconf.padding + pconf.sideLineWidth )*
*      or*
*      KeyPressed( keyText == "K" ) and bat : Bat( playerId ==
PlayerId.PlayerTwo, y > pconf.padding + pconf.sideLineWidth ) ) *
*    td : TableDirty( )      *
*then    *
*    tableG = ui.getTablePanel().getTableG();*
*    tableG.setColor( Color.BLACK ); // background*
*    tableG.fillRect( bat.x, bat.y, bat.width, bat.height );*
*     *
*    modify( bat ) { y = bat.y - 2 };*
*    tableG.setColor( Color.WHITE ); // background*
*    tableG.fillRect( bat.x, bat.y, bat.width, bat.height );  *
*    modify( td ) { dirty = true };*
*end*

the error message is:
[Error: unable to resolve method using strict-mode:
org.drools.spi.KnowledgeHelper.td<http://org.drools.spi.knowledgehelper.td/>
()]
[Near : {... @Modify with( td ) { dirty = true }; ....}]


in another File (ui.drl) TableDirty is defined:

*declare TableDirty*
* @propertyReactive*
*    dirty : boolean*
*end*



Any ideas what this error message means? And why can I start pong despite
this error?

Thanks a lot for helping me

Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130410/35585ff1/attachment-0001.html 


More information about the rules-users mailing list