Changing Script In Standalone

Jim Ault JimAultWins at yahoo.com
Tue May 2 01:26:24 EDT 2006


Correct on the 10 'statement' limit.
You may need to use
create a sub stack,  set the script of the stack, then
start using stack 'substackname'.  You are allowed 50 stacksInUse.

>From the Docs (2.6.1 Mac)------------------------------------------

Returns the limits on script length for scripts that are edited in a
Revolution.

the scriptLimits
scriptLimits()

Description
Use the scriptLimits function to determine the limits on changing scripts
when using standalone applications created with Revolution.

Value:
The scriptLimits function returns a comma-separated list of four positive
integers. Where 0 occurs in the list it indicates that the limit is
unchecked and therefore unlimited.

Comments:
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's script
property, and the script contains more than the allowable number of
statements, the attempt to set the script causes an error.


On 5/1/06 8:52 PM, "Stephen Barncard" <stephenREVOLUTION at barncard.com>
wrote:

> It should be mentioned that there are script limits in a standalone.
> 10 lines, as I remember.
> 
> sqb
> 
> 
>> Bridger....
>> 
>> At leat part of the problem is that Revolution does not permit on-the-fly
>> modification of data of any kind in a stack (app) at runtime in the
>> standalone environment. You get around that particular limitation by storing
>> the changeable data in a sub-stack of your app's mainstack and setting up
>> standlone settings so that it creates that stack separately as well. Then
>> you may be able to tell a button in mainstack to set a script in a button of
>> a substack but I haven't tested that idea.
>> 
>> On 5/1/06, Bridger Maxwell <bridgeyman at gmail.com> wrote:
>>> 
>>> Hey,
>>>   In one of my programs I use the "Set the script of object to string"
>>> alot,
>>> but when I recently switched over to 2.7.1 Studio and started to make
>>> standalone programs, I noticed that this no longer works.  For my test I
>>> made a field and two buttons, one button set the script of the other
>>> button
>>> to the field.  I typed a simple on mouseUp handler that answers a message.
>>> It worked when I did it in the development environment, but not as a
>>> standalone.  Does this mean that I can't change script from the
>>> user-interface after it has been saved as a standalone?  Can someone give
>>> me
>>> the basic rundown of how Revolution compiles stacks into a standalone?
>>> 
>>>   TTFN (ta-ta-for-now)
>>>    Bridger





More information about the use-livecode mailing list