Hi Ender, Stacks in use receive messages at stack level, not at card level.
Use a button for each part of your library and use backscripts and frontscripts. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com We have time for new software development projects. Contact me for a quote. On 13 feb 2014, at 12:13, Ender Nafi Elekcioglu 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