Re: Seeking recommendations / suggestions for use of library stacks.

2017-05-19 Thread Bob Sneidar via use-livecode
I would agree, but I have become fond of constants, especially in objects where code is similar but need certain things to be different. For instance I have a button bar which opens for edit, creates new form, deletes data, saves data etc. I copy this bar to each of my forms. The code in most

Re: Seeking recommendations / suggestions for use of library stacks.

2017-05-18 Thread Andre Garzia via use-livecode
g stack > "fastJSONlib" > end releaseStack > > note that using "is among" and "is not among" is not optional otherwise you > end up in an infinite loop > > > > - > --- > Greg (pink) Miller > mad, pink and dangerous to code >

Re: Seeking recommendations / suggestions for use of library stacks.

2017-05-16 Thread pink via use-livecode
using stack "fastJSONlib" end releaseStack note that using "is among" and "is not among" is not optional otherwise you end up in an infinite loop - --- Greg (pink) Miller mad, pink and dangerous to code -- View this message in context: http://runtime-revolution.

Re: Seeking recommendations / suggestions for use of library stacks.

2017-05-15 Thread Alex Tweedly via use-livecode
Thanks Ali, that's a nice idea. But just in case anyone else does the same as me (i.e. copy/paste it without looking too hard :-) : there should NOT be an 'else' clause in there right now it will either set the variable OR do the initialization, when in fact it should do BOTH or

Re: Seeking recommendations / suggestions for use of library stacks.

2017-05-15 Thread Ali Lloyd via use-livecode
One simple way to make this slightly nicer would be to make sure all your initialisation happens in a separate handler eg (doLibraryInitialization), and use your script local lock in the libraryStack handler > local sIHaveBeenInitialized > on librarystack > if sIHaveBeenInitialized is empty

Re: Seeking recommendations / suggestions for use of library stacks.

2017-05-14 Thread J. Landman Gay via use-livecode
On 5/13/17 6:29 PM, Alex Tweedly via use-livecode wrote: all initialisation would be done in the librarystack handler that handler would also set a script-local variable to avoid repeated initialisation so something like local sIHaveBeenInitialized on librarystack if sIHaveBeenInitialized

Seeking recommendations / suggestions for use of library stacks.

2017-05-13 Thread Alex Tweedly via use-livecode
I'm starting to make more use of library stacks (partly because I'm trying to switch away from revIgniter to a CGI-based solution to allow me to do more work & debugging in the IDE). And now I'm looking for best-practice and/or suggestions for how to use library stacks. The