Re: LibraryStack Message
No close quote Bob S On Nov 23, 2016, at 17:38 , Richard Gaskin> wrote: > start using stack "HelloWorld.livecodescript # ___ 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
Re: LibraryStack Message
The libraryStack handler should only fire when the stack is first put in use. It's like an openstack handler for libraries. Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On November 23, 2016 4:33:42 PM Sannyasin Brahmanathaswamiwrote: if you have a stack in your repository e.g. lib_colorManipulation.livecode # script only that is in the stack files and your initialization script loops through the stack files and for every "lib_*" file it runs start using stack [lib_colorManipulation.livecode] # and any others… these are all effectively put into the message path. OK so far, no brainer BUT if your stack wants to also do some initialization itself… and you put this into one of those stacks: on libraryStack # do more initialization stuff here that you # may prefer to encapsulate inside this script end libraryStack is "libraryStack" fired every time a handler is used in that script/stack? or is "libraryStack" only issued with the very first "start using ….." ? this issue is: we don't want the initialization scripts in the stack to fire everytime it is called, only on the very first "start using" Svasti Astu, Be Well Brahmanathaswami www.himalayanacademy.com ___ 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
Re: LibraryStack Message
Sannyasin Brahmanathaswami wrote: > (hmm I guess this would be easy enough to test, > now that I break it down….) Nothing beats hands-on empirical evidence. And maybe needed here, because to be honest I don't understand your script. I see that you have a "start using" command, but I don't see it inside of any handler, so I can't imagine how it ever gets triggered. I also don't see anything in your mouseUp handler that includes "start using", so I can't imagine how the mouseUp handler could trigger a libraryStack message, or anything other than the wonderOfWonders command you included in it. From the number of questions about things like this it seems you may have an unusually complex initialization setup. I wonder if there's some way it may be simplified. I suppose it's possible to write complex code in any language, but loading some libraries needn't be difficult in an xTalk. > helloWorld.livecodescript # stack > > # contains handler 1 > > on libraryStack >answer "One World, One God" with "OK!" > end libraryStack > > # contains handler 2 > > on wonderOfWonders > Answer "The new president!" with "God Help Him/Us!" > end wonderOfWonders > > - > initializeApp.livecodeScript > # does a variety of job including: > start using stack "HelloWorld.livecodescript # > helloWord.livecodescript is now a "back" script. > > -- > # some higher level button on a card script or wherever > > on mouseup > wonderOfWonders # evokes dialog from helloWorld.livecodescript > end mouseUp > > # but is the "libraryStack" also passed from hello > world stackk when that button is pressed that calls a handler within > it?? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ 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
Re: LibraryStack Message
I guess I am not being clear (hmm I guess this would be easy enough to test, now that I break it down….) helloWorld.livecodescript # stack # contains handler 1 on libraryStack answer "One World, One God" with "OK!" end libraryStack # contains handler 2 on wonderOfWonders Answer "The new president!" with "God Help Him/Us!" end wonderOfWonders - initializeApp.livecodeScript # does a variety of job including: start using stack "HelloWorld.livecodescript # helloWord.livecodescript is now a "back" script. -- # some higher level button on a card script or wherever on mouseup wonderOfWonders # evokes dialog from helloWorld.livecodescript end mouseUp # but is the "libraryStack" also passed from hello world stackk when that button is pressed that calls a handler within it?? On 11/23/16, 12:50 PM, "use-livecode on behalf of Richard Gaskin"wrote: Sannyasin Brahmanathaswami wrote: ... > on libraryStack > # do more initialization stuff here that you > # may prefer to encapsulate inside this script > end libraryStack ... > ? this issue is: we don't want the initialization scripts in the > stack to fire everytime it is called, only on the very first "start > using" If you don't want your global library to handle all libraryStack messages you can add a condition like: on libraryStack if the short name of the target <> the short name of me then pass libraryStack end if # do more initialization stuff here that you # may prefer to encapsulate inside this script end libraryStack ___ 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
Re: LibraryStack Message
Sannyasin Brahmanathaswami wrote: ... > on libraryStack > # do more initialization stuff here that you > # may prefer to encapsulate inside this script > end libraryStack ... > ? this issue is: we don't want the initialization scripts in the > stack to fire everytime it is called, only on the very first "start > using" If you don't want your global library to handle all libraryStack messages you can add a condition like: on libraryStack if the short name of the target <> the short name of me then pass libraryStack end if # do more initialization stuff here that you # may prefer to encapsulate inside this script end libraryStack -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ 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