Re: Front Scripts
I suppose if it worked the other way around, the command would be append the script of object in front Bob On Jul 18, 2012, at 5:34 PM, Dar Scott wrote: On Jul 18, 2012, at 4:53 PM, Peter Haworth wrote: This is all back to front to me…. OR The first one now will later be last…. OR What goes up the chimney down but not down the chimney up? You might be comforted by these words from The Reluctant Dragon (1941) to be read with poetic emotion. “To an Upside Down Cake” by the Reluctant Dragon Sweet little upside down cake, Cares and woes, you’ve got ‘em. Poor little upside down cake, Your top is on your bottom! Alas! Little upside down cake, Your troubles never stop! Because, little upside down cake, Your bottom’s on your top! Though that might comfort, it might not help you remember. Perhaps one can think of 'insert' as being like 'put before' if backscripts was a global and not a function. OK, maybe that doesn't help. Dar (Matthew 20:16a) ___ 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: Front Scripts
Hi, That's very simple. One front script comes after the other. If the first front script doesn't pass the message, then the second front script won't run. If you're making a plugin, you need to pass the message and good developers do this. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Economy-x-Talk is looking for an amateur painter/cartoonist/poet etc. Contact me http://qery.us/du On 18 jul 2012, at 21:03, Peter Haworth wrote: I'm wondering what happens if two front scripts each contain a handler for the same message. I can envisage this happening if, for example, a product I provide inserts a front script and the user is using a product from a different developer that also inserts a froct script containing a handler that is in mine. I can't imagine that the outcome would be good! Pete lcSQL Software http://www.lcsql.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: Front Scripts
Thank you Mark, I'm glad to hear that's how it works. I am, of course, planning on passing the message. I checked out Richard Gaskin's excellent write up on extending the message path before asking this question, but it it doesn't really deal with this situation - Richard, might be worth a note in the section on front/back scripts? Pete lcSQL Software http://www.lcsql.com On Wed, Jul 18, 2012 at 12:10 PM, Mark Schonewille m.schonewi...@economy-x-talk.com wrote: Hi, That's very simple. One front script comes after the other. If the first front script doesn't pass the message, then the second front script won't run. If you're making a plugin, you need to pass the message and good developers do this. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Economy-x-Talk is looking for an amateur painter/cartoonist/poet etc. Contact me http://qery.us/du On 18 jul 2012, at 21:03, Peter Haworth wrote: I'm wondering what happens if two front scripts each contain a handler for the same message. I can envisage this happening if, for example, a product I provide inserts a front script and the user is using a product from a different developer that also inserts a froct script containing a handler that is in mine. I can't imagine that the outcome would be good! Pete lcSQL Software http://www.lcsql.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: Front Scripts
Peter Haworth wrote: I'm wondering what happens if two front scripts each contain a handler for the same message. ... I checked out Richard Gaskin's excellent write up on extending the message path before asking this question, but it it doesn't really deal with this situation - Richard, might be worth a note in the section on front/back scripts? It may just need to be more prominent - in the section on Backscripts it includes: In LiveCode all libraries and backScripts can freely call each others' handlers by name, with the order of insertion only coming into play in the event that two scripts contain handlers of the same name; in such cases libraries take precedence over backscripts, and scripts inserted first take precedence over scripts inserted later. -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys ___ 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: Front Scripts
On Jul 18, 2012, at 2:50 PM, Richard Gaskin wrote: It may just need to be more prominent - in the section on Backscripts it includes: In LiveCode all libraries and backScripts can freely call each others' handlers by name, with the order of insertion only coming into play in the event that two scripts contain handlers of the same name; in such cases libraries take precedence over backscripts, and scripts inserted first take precedence over scripts inserted later. From the dictionary: Objects added to the front or back are placed at the start of the frontScripts or backScripts list: the last-inserted object gets messages first. It would be nice to insert into the back of backScripts, but I don't think that is the simple 'insert' behavior. I think I checked this one time. Maybe I'm reading your paragraph wrong. My sentences seem to evolve and take on lives of their own during editing. The sentence on order for stack libraries in the dictionary is confusing, so I'm not sure what it is saying about order. Dar ___ 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: Front Scripts
Interesting, I would have thought the last inserted script would take precedence, as in the old Military standing order, obey the last order first. There is a lot of good wisdom to that. Bob On Jul 18, 2012, at 1:50 PM, Richard Gaskin wrote: in such cases libraries take precedence over backscripts, and scripts inserted first take precedence over scripts inserted later. ___ 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: Front Scripts
Thanks Richard, yes I was just reading the front script section. Pete lcSQL Software http://www.lcsql.com On Wed, Jul 18, 2012 at 1:50 PM, Richard Gaskin ambassa...@fourthworld.comwrote: It may just need to be more prominent - in the section on Backscripts it includes: In LiveCode all libraries and backScripts can freely call each others' handlers by name, with the order of insertion only coming into play in the event that two scripts contain handlers of the same name; in such cases libraries take precedence over backscripts, and scripts inserted first take precedence over scripts inserted later. ___ 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: Front Scripts
I read the dictionary entry as meaning that the last script inserted into the front scripts will be executed before the first one, so the message path starts at the last script inserted then prgresses through any others until the first one inserted. I don;t think any of this will be a problem for me. I'm grabbing certain messages about objects being created or deleted, processing them in a way that doesn;t touch the object in any way, then passing the message on. Pete lcSQL Software http://www.lcsql.com On Wed, Jul 18, 2012 at 2:02 PM, Dar Scott d...@swcp.com wrote: From the dictionary: Objects added to the front or back are placed at the start of the frontScripts or backScripts list: the last-inserted object gets messages first. It would be nice to insert into the back of backScripts, but I don't think that is the simple 'insert' behavior. I think I checked this one time. Maybe I'm reading your paragraph wrong. My sentences seem to evolve and take on lives of their own during editing. The sentence on order for stack libraries in the dictionary is confusing, so I'm not sure what it is saying about order. ___ 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: Front Scripts
Yes you have it right there Peter. I just read it myself, and the key is that the order the scripts appear in the list is the reverse of the order they were entered, which means the last insert goes at the top and then they scripts follow the order of the list, meaning, much like the Military, the last goes first. Bob On Jul 18, 2012, at 2:52 PM, Peter Haworth wrote: I read the dictionary entry as meaning that the last script inserted into the front scripts will be executed before the first one, so the message path starts at the last script inserted then prgresses through any others until the first one inserted. ___ 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: Front Scripts
On 7/18/12 5:01 PM, Bob Sneidar wrote: Yes you have it right there Peter. I just read it myself, and the key is that the order the scripts appear in the list is the reverse of the order they were entered, which means the last insert goes at the top and then they scripts follow the order of the list, meaning, much like the Military, the last goes first. It depends. With frontscripts, new insertions go to the front of the front and get messages before older insertions. With backscripts, the newest insertion goes to the back of the back, so it gets messages last. I haven't tested, but if LiveCode follows HyperCard precedence (which it usually does) then libraries are the opposite. In HC, when you start using a stack, it's inserted in front of the last stack you started using; that is, it goes to the front of the back. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.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: Front Scripts
Hi Jacque, OK, well that contradicts the dictionary entry where it describes the exact same mechanism for both front and back scripts, i.e. messages go the first inserted script last and the last inserted script first for bot front scripts and back scripts. Course, it wouldn't be the first time the dictionary was wrong I also noticed that even messages sent with the send (and presumably dispatch) to a specific object will go through the front scripts before reaching their target. This is all back to front to me…. OR The first one now will later be last…. OR What goes up the chimney down but not down the chimney up? Pete lcSQL Software http://www.lcsql.com On Wed, Jul 18, 2012 at 3:11 PM, J. Landman Gay jac...@hyperactivesw.comwrote: It depends. With frontscripts, new insertions go to the front of the front and get messages before older insertions. With backscripts, the newest insertion goes to the back of the back, so it gets messages last. ___ 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: Front Scripts
On 7/18/12 5:53 PM, Peter Haworth wrote: Hi Jacque, OK, well that contradicts the dictionary entry where it describes the exact same mechanism for both front and back scripts, i.e. messages go the first inserted script last and the last inserted script first for bot front scripts and back scripts. Course, it wouldn't be the first time the dictionary was wrong Wouldn't be the first time I was wrong either. Someone with time should check it. Maybe that will be me...sometime. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.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: Front Scripts
Hi, Jacque! I made the time. Inserting a script into the back puts it at the front of the back. That is consistent with the order in the backscripts. I have not confirmed stack libraries, but if they are the same then adding scripts in all methods put them at the front of the applicable list. Dar On Jul 18, 2012, at 5:06 PM, J. Landman Gay wrote: On 7/18/12 5:53 PM, Peter Haworth wrote: Hi Jacque, OK, well that contradicts the dictionary entry where it describes the exact same mechanism for both front and back scripts, i.e. messages go the first inserted script last and the last inserted script first for bot front scripts and back scripts. Course, it wouldn't be the first time the dictionary was wrong Wouldn't be the first time I was wrong either. Someone with time should check it. Maybe that will be me...sometime. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.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: Front Scripts
On Jul 18, 2012, at 4:53 PM, Peter Haworth wrote: This is all back to front to me…. OR The first one now will later be last…. OR What goes up the chimney down but not down the chimney up? You might be comforted by these words from The Reluctant Dragon (1941) to be read with poetic emotion. “To an Upside Down Cake” by the Reluctant Dragon Sweet little upside down cake, Cares and woes, you’ve got ‘em. Poor little upside down cake, Your top is on your bottom! Alas! Little upside down cake, Your troubles never stop! Because, little upside down cake, Your bottom’s on your top! Though that might comfort, it might not help you remember. Perhaps one can think of 'insert' as being like 'put before' if backscripts was a global and not a function. OK, maybe that doesn't help. Dar (Matthew 20:16a) ___ 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: Front Scripts
Thanks for taking the time to confirm that Dar. Pete lcSQL Software http://www.lcsql.com On Wed, Jul 18, 2012 at 5:12 PM, Dar Scott d...@swcp.com wrote: Hi, Jacque! I made the time. Inserting a script into the back puts it at the front of the back. That is consistent with the order in the backscripts. I have not confirmed stack libraries, but if they are the same then adding scripts in all methods put them at the front of the applicable list. Dar On Jul 18, 2012, at 5:06 PM, J. Landman Gay wrote: On 7/18/12 5:53 PM, Peter Haworth wrote: Hi Jacque, OK, well that contradicts the dictionary entry where it describes the exact same mechanism for both front and back scripts, i.e. messages go the first inserted script last and the last inserted script first for bot front scripts and back scripts. Course, it wouldn't be the first time the dictionary was wrong Wouldn't be the first time I was wrong either. Someone with time should check it. Maybe that will be me...sometime. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.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 ___ 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: Front Scripts
Peter Haworth wrote: I just realized that the stacks that I insert as front scripts are included in the Contents of a standalone application on a Mac. I may decide to package some of those scripts and try to sell them in the future but this makes them available to anyone who takes the time to look at the contents of the standalone. set the password of stack MyStack to MyPassword To access the scripts in the IDE use: set the passkey of stack MyStack to MyPassword -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com LiveCode Journal blog: http://LiveCodejournal.com/blog.irv ___ 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: Front Scripts
Thanks Richard, I knew it would be something simple! Pete Haworth On Jan 7, 2011, at 10:26 AM, Richard Gaskin wrote: Peter Haworth wrote: I just realized that the stacks that I insert as front scripts are included in the Contents of a standalone application on a Mac. I may decide to package some of those scripts and try to sell them in the future but this makes them available to anyone who takes the time to look at the contents of the standalone. set the password of stack MyStack to MyPassword To access the scripts in the IDE use: set the passkey of stack MyStack to MyPassword -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com LiveCode Journal blog: http://LiveCodejournal.com/blog.irv ___ 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