statik37
January 14th, 2021, 17:55
I have a, probably, silly question.
If I have a template in a windowclass that references a lua file and I want to initate a function in that file from a different lua file in a different template in a different windowclass in the same file?
So for example
<windowclass name ="main">
<sample_1 name="firstTemplate">
</windowclass>
<windowclass name ="sub">
<sample_2 name="secondTemplate">
</windowclass>
If you go into the sample_1 template there is
<script file="scripts/primary.lua" />
Can I add a lua file to sample_2 that calls a function from primary.lua?
I tried window.functionName(), but it doesn't want to work. I know I'm missing something simple, I just can't see it.
If I have a template in a windowclass that references a lua file and I want to initate a function in that file from a different lua file in a different template in a different windowclass in the same file?
So for example
<windowclass name ="main">
<sample_1 name="firstTemplate">
</windowclass>
<windowclass name ="sub">
<sample_2 name="secondTemplate">
</windowclass>
If you go into the sample_1 template there is
<script file="scripts/primary.lua" />
Can I add a lua file to sample_2 that calls a function from primary.lua?
I tried window.functionName(), but it doesn't want to work. I know I'm missing something simple, I just can't see it.