ScriptLimits - please explain
Posted: Tue May 11, 2010 5:34 pm
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
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