Hard CASE: cracking the nut?

Marty Knapp martyknapp at comcast.net
Wed May 26 20:42:59 CDT 2010


What I have is a standalone that contains template stacks from which a 
user creates their own stacks. These stacks are saved outside of the 
standalone. I wanted to institute an updating feature, where the user's 
stack version is compared to the template (which may have had revisions 
from being updated) on launch and if needed to have the standalone copy 
the scripts from the template into the user stack, rather than making 
them create a new stack. But if any of these scripts exceed the 10 
statement limit it will not work. So I stripped the template stack of as 
much code as I could, which also minimizes the need for updating in the 
first place :)

But this user stack needs access to the standalone stacks and scripts to 
function properly, so now I've found that if the user launches the 
standalone by double-clicking their stack, that once in a while the 
stacks/scripts it needs are not available and I get errors when the user 
stack loads. Not always, but probably 1 in 10 times. I've tried a number 
of routines to check for this, but these routines need to be in the user 
stack and I run into the 10 statement limit . . .

I hope that's understandable!
Marty
> Marty Knapp wrote:
>> I've been running into the 10-statement script limit issue myself. Is 
>> there a way to put a script into a field or custom property and 
>> execute it without a "do" command? If so, could someone offer an 
>> example? In my current scenario, speed is not a big issue.
>
> That depends on what you need to do. If you need to create new scripts 
> with new functionality on the fly then you'll need to stay within the 
> 10 line limit. But most of the time, you can substitute backscripts, 
> behaviors, or custom functions and handlers that accept passed 
> parameters to do whatever you need.
>
> If you can say a little more about what you need to accomplish we can 
> probably help better. There's not much that really requires dynamic 
> scripting.
>
> Post your dynamic script for us to look at, maybe?
>




More information about the use-livecode mailing list