Script Only Stack Architecture

Richard Gaskin ambassador at fourthworld.com
Fri Apr 1 07:18:07 CEST 2016


James Hale wrote:
 > I fail to see the inclusion of examples of the syntax to a dictionary
 > entry as bloat.

Excellent.  That makes it unanimous, as I've not seen anyone else here 
argue against having syntax examples in the Dictionary either.

In fact, I can't think of any Dictionary entry that doesn't have at 
least one, and many have several.


 > I may be one of only a few but I find many of the dictionary entries
 > opaque to say the least.

Aye, there's the rub: examples are good, excellent examples are great.


 > Ali's example of how one would employ a script only stack as a
 > behavior is a case in point. It immediately makes employing this
 > method accessible and understandable.

As we've seen throughout this thread, there are many ways to solve 
problems, and some will resonate well with some readers and other forms 
with other readers.

For example, the form Ali offered is useful for the unusual demands of 
the IDE but isn't commonly used elsewhere.  It reads nicely, but it's 
not nearly as lean as no code at all.

As noted very early on in this thread, there are reasons why it's 
sometimes necessary to write extra scripts that assign behaviors to 
objects at runtime.  But the beauty of a property setting is that you 
set it once in the IDE and never have to touch it again.

Writing a script to do that for you isn't the hardest thing in the 
world, but if you have a hundreds objects it can get tedious to type. 
And with the IDE tools in most cases you don't need to be scripting that 
at all.

Its good choice where it's used in the IDE, but the IDE has unusual 
requirements.

For example, the revMenubar stack creates all of its objects and sets 
all of their properties on the fly in script.  Useful for the very 
specific reasons they did it, but most of us just use the GUI tools and 
enjoy not having to define every visual element in long code blocks like 
C coders are accustomed to.  Indeed, having an integrated GUI is often a 
big part of why we choose xTalks.

All that said, it never hurts to have another syntax example.  Feel free 
to add it - these guidelines can help you get started:
https://livecode.com/putting-the-you-in-documentation/

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for Desktop, Mobile, and Web
  ____________________________________________________________
  Ambassador at FourthWorld.com        http://www.FourthWorld.com




More information about the use-livecode mailing list