Not the way you are doing it. Only the STACK script is in the message path. Not 
every script of every object IN the stack! 

That being said, you could certainly insert the script of every card of the 
library stack, but that might be messy. An alternative might be to put all the 
handlers in the stack script, then name the handlers in such a way as they 
would sort in groups. All your math functions could start with calc. All your 
information handlers could begin with info, and so on. 

Now, I’m sure it’s just an example, and you aren’t really using a one line 
function called calcSum. Are you?? :-)

Bob


On Feb 13, 2014, at 03:13 , Ender Nafi Elekcioglu <endern...@keehuna.com> wrote:

> 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
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to