Here is a very simple example of what I want to do:
1. Load in the template definition in this file called testclass.hoc:
Code: Select all
begintemplate myclass
public mystring
strdef mystring
proc init() {
set_string()
use_string()
}
proc set_string() {
mystring="hello brain"
}
proc use_string() {
load_file("myfile.hoc")
}
endtemplate myclass
Code: Select all
print mystring
Code: Select all
objref c
c = new myclass()
How can I include a file within my template that knows the variables defined within the template?