#1532 fwt/demo.fan, error at makeCursors

hernad Mon 16 May 2011

I have error trying to compile this script:

bringout@nd-273:~/devel/fantom/fan/examples/fwt$ fan demo.fan

/home/bringout/devel/fantom/fan/examples/fwt/demo.fan(551,7): 
Expected expression statement
ERROR: cannot compile script

source code:

...
Widget makeCursors()
{
  return GridPane
  {
    numCols = 3
    grid := it
    Cursor.predefined.each |Cursor c| <<<<<<<<<<<<<< line 551
    {
      grid.add(CursorDemo { text = c.toStr(); cursor = c})
    }
    grid.add(CursorDemo { text = "custom"; cursor = Cursor(refreshIcon, 8, 8)})
  }
}
...

brian Mon 16 May 2011

@hernad,

It looks like maybe you are using the version of examples which is pushed to hg, but not yet deployed in the standard build. Have you also pulled gfx and fwt from hg and rebuilt those?

hernad Tue 17 May 2011

@brian,

you are quite right. Last night I experimented with (hg) trunk repository and obviously made mess :)

I have restored original 1.0.58 repository and demo.fun is regulary compiled and run.

I have als compiled trunk repository also, but haven't succesful run.

But, that's another topic. I will not be suprised runtime errors are caused by my mistake in build or configuration process.

Thank you brian.

DanielFath Tue 17 May 2011

Speaking of cursor demo works only in SWT mode. In browser mode it always displays the red X.

Yuri Strot Tue 17 May 2011

Cursor demo should work both for SWT and JavaScript. Especially the latest version from head works pretty well for me. Which version/environment do you use?

DanielFath Tue 17 May 2011

Hmm it must have been an old version. Before the green and red box were added. It works ok now.

Login or Signup to reply.