Best Practice for Library Stacks
Ender Nafi Elekcioglu
endernafi at keehuna.com
Thu Feb 13 06:13:53 EST 2014
Hello,
I have a library stack which consists all my common functions and commands.
Calculations, text manipulation, getting device info, update procedures, etc.
Stack’s script is close 5000+ line of code.
I wanted to organize it and put related handlers into the script of respective cards.
But it didn’t work, calling a function from my mainstack’s cards throws an error.
I know that I can dispatch a function but it’s not effective.
Here is an example:
_main stack
___card 1
___card 2
___…
__library stack
___card 1
___card 2
___…
Script of card 1 of library stack:
function calcSum pX, pY
return pX + pY
end function
Script of card 2 of main stack:
on answerSum
answer calcSum(3, 5)
end answerSum
Is this possible?
Can I distribute my handlers onto different cards of the library stack
and still call them directly?
Thanks,
~ Ender
More information about the use-livecode
mailing list