The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Domingo (7) [Avatar] Offline
In the listing 18.16 (in the DSL chapter) authors describe the way to make Robot DSL case insensitive. This example works correctly as long as we don't start to invoke commands starting with capital letter, so all invocations like 'mOVE, moVe...' are correct, but 'Move' is not. We will get an exception saying:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 2: unable to resolve class Move
@ line 2, column 7.
Move left

1 error

Does it mean that compiler tries to find a class here? In order to make it easier to test this example I put the source code in the following gist:

BTW. Notice that I needed to pass current class loader to the shell in order to run this example (in original listing in the book it's not needed but in that case I got exception informing on different classloaders involved).