Best Practice for Library Stacks
Richard Gaskin
ambassador at fourthworld.com
Thu Feb 13 10:46:16 EST 2014
Earthednet-wp wrote:
> I like the idea of putting libraries into buttons, then copying
> them into the front script at startup. When you say there is a
> limit of some number of scripts, what counts for a "script"? Is
> a single script counted as all the handlers contained within a
> single button?
There used to be limits; it remains to be seen if there still are, or if
the Dictionary entry for scriptLimits just needs to be updated.
You can check out that entry for details, but in short there were the
following limits when running in a standalone, which do not apply in the
IDE:
10 frontScripts
10 backScripts
50 libraries
10 executable lines in any string evaluated by "do" or "value"
The latter doesn't include comments, and if a single statement is
written across multiple lines with a continuation character ("\") it
still only counts as one line.
These were initially added to the engine to solve what's become known in
xTalk history as "The Digital Chisel Problem", in which a SuperCard user
once built an authoring system that directly competed with SuperCard
using SuperCard itself. Ironically enough, SC won the MacEddy award for
"Best Multimedia Authoring Tool" in 1995, and Digital Chisel won that
award in '96. DC did well - at the expense of the company that provided
90% of their tool's functionality.
Because of the impact DC had on SC sales, Allegiant Technologies (owners
of SC at the time) negotiated an agreement with the makers of DC
involving undisclosed royalty amounts in exchange for continued use of
new versions of SC.
Every xTalk vendor learned from that moment, and each put into place
their own means of dealing with it in their EULA and in their product.
MetaCard's solution (and since, LC's) was to use scriptLimits, seeking a
balance between providing sufficient flexibility for most developers
while reducing the likelihood of being able to make a product using MC
which competes directly with MC.
But now that LC is the first major xTalk to go open source, it may be
that these limits are no longer relevant. LC's EULA still prohibits
using LC's Commercial edition to make a product that directly competes
with it, and of course the Community edition is governed by the GPL
which grants all users the right to fork it however they like.
We'll see what the team says in response to my bug report, but either
way it's all good to me. The scriptLimits have never prevented me from
shipping even complex apps, and Kevin has been very open about being
willing to negotiate raising the scriptLimits for any serious developer
who truly needs it; in fact, I think he did that once a few years ago
for a developer making a product that relied on an unusual set of
frontScripts.
--
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
More information about the use-livecode
mailing list