Sorry if this is a stupid question, but I’ve really been struggling to get a library stack working within a main stack. Basically I want to add some code to a substack and call it from the main stack, Here’s what I did based on what I’ve been able to find so far.
1. Created a new stack called MainApp
2. Added a substack this this called ScriptStack
3. In the script of ScriptStack I created a simple function like this:
Code: Select all
function sayHelloWorld
put "Hello World"
end sayHelloWorld
on mouseUp pButtonNumber
Code: Select all
start using stack "ScriptStack"
sayHelloWorld
end mouseUp
Code: Select all
button "Button": execution error at line 4 (Handler: can't find handler) near "sayHelloWorld", char 1
Any help which can be offered would be gratefully received.
Many thanks