I suspect the answer to this is either going to be very simple, or very complicated...
If I have fan script, how do I created an instance of a class that lives inside another fan script? (I'm talking scripts here, not classes in pods.)
Specifically, I have myScript.fan and I want it to create an instance of build.fan so it can read / access the podName the pod name field.
myScript.fan
build.fan
podName
Core API:
Env.cur.compileScript(file).make->main
If you are in a build script, then you can use FanScript which just wraps that code:
FanScript
FanScript(this, file).run
Awesome, it was the simple case! Env.cur.compileScript(file).make does the job.
Env.cur.compileScript(file).make
Login or Signup to reply.
SlimerDude Fri 17 May 2013
I suspect the answer to this is either going to be very simple, or very complicated...
If I have fan script, how do I created an instance of a class that lives inside another fan script? (I'm talking scripts here, not classes in pods.)
Specifically, I have
myScript.fan
and I want it to create an instance ofbuild.fan
so it can read / access thepodName
the pod name field.brian Fri 17 May 2013
Core API:
If you are in a build script, then you can use
FanScript
which just wraps that code:SlimerDude Fri 17 May 2013
Awesome, it was the simple case!
Env.cur.compileScript(file).make
does the job.