Hi,
As a new user (6months) I have been planning my first serious application and reading about sub-stacks, library stacks, front & back scripts, behaviours and message paths (phew!). One of the papers I found is published on the Forth World web site with the title "Extending the Runtime Revolution Message Path" by Richard Gaskin. It all makes perfect sense right up to the last page where Richard writes about "ScriptLimits". These limits are new to me and I don't understand what and where they apply. I have searched the forum but only found a bit of a slanging match and the RunRev dictionary seems to imply that the restrictions only apply to "dynamic changing" code. Is someone willing to explain what the following restrictions mean:
<quote the dictionary >
The four numbers returned by the scriptLimits function are:
* the number of statements permitted when changing a script (normally 10 in a standalone application)
* the number of statements permitted in a do command (normally 10 in a standalone application)
* the number of stacks permitted in the stacksInUse (normally 50 in a standalone application)
* the number of objects permitted in the frontScripts and backScripts (normally 10 in a standalone application)
Important! The first number does not limit scripts that are already written. In other words, standalone applications can run scripts of any length. However, if the standalone attempts to change an object'sscriptproperty, and the script contains more than the allowable number of statements, the attempt to set the script causes an error.
<end quote>
I think I understand the 3rd and 4th items.
thanks for reading
Simon
ScriptLimits - please explain
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 919
- Joined: Wed Nov 04, 2009 11:41 am
ScriptLimits - please explain
best wishes
Skids
Skids
Re: ScriptLimits - please explain
Hi Simon,
Suppose you want to execute the following two commands (independenty of each other):
In those cases, the variable myScript can contain at most 10 lines. Sometimes, a statement is not exactly the same as the number of lines in a script. For example, I don't think that "on mouseUp", "end mouseUp", "end if" and "end repeat" are statements.
Best regards,
Mark
Suppose you want to execute the following two commands (independenty of each other):
Code: Select all
set the script of button x to myScript
do script myScript
Best regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 919
- Joined: Wed Nov 04, 2009 11:41 am
Re: ScriptLimits - please explain
Thanks for the example. I think I understand now.
best wishes
Simon
best wishes
Simon
best wishes
Skids
Skids