#1199 run fantom script problem

go4 Mon 6 Sep 2010

I like run the file as script . I do little change so that the flux can run script. But how to create a new file in flux?

When runing a script which is one of exist pod and reference side class, must add the using. It's a build-error, because it declared using the self pod. it's very bother.

brian Mon 6 Sep 2010

Not sure I completely follow that. Maybe what you really need is a script file which reference other files? But in reality it is multiple files in the same pod?

go4 Tue 7 Sep 2010

Yes ,the script is reference other file . I put them in a pod and build it ,then add a using declare for script

brian Tue 7 Sep 2010

As designed if you want a pod module, then you need to compile it first. Although if you want to compile and run with one simple step, then an easy way to do that is just add a target in your build script:

@Target { help = "Build and run" }
Void buildAndRun()
{
  compile
  fanExe := Exec.exePath(devHomeDir + `bin/fan`)
  Exec(this, [fanExe, "$podName::Foo"]).run
}

go4 Wed 8 Sep 2010

Thank you ,I have know my mistake

Login or Signup to reply.