Hard CASE: cracking the nut?
J. Landman Gay
jacque at hyperactivesw.com
Wed May 26 13:04:26 CDT 2010
Richmond Mathewson wrote:
> A while back Scott Rossi wrote:
> "Maybe because standalones have an (editable) script limit of 10 lines,
> meaning you can't build scripts dynamically in standalones that exceed
> 10 lines. There is no such limit in the IDE."
> seems not to, directly refer to my script problem;
I'm pretty sure that's the problem, and was going to mention it except
Scott beat me to it.
> EXCEPT; my problematic script (that works in a stack, but not in a
> thread through a variety of scripts that exceed 10 lines and reside in
> Does anybody know if reffing scripts infields is interpreted as building
> scripts dynamically as they are not directly entered in the 'script space'
> of a particular object ?
They are. Any script that isn't pre-compiled in the script editor is
> If the above is so; would I be able to circumvent the need to store
> scripts many times over in each object by stroing a script as a custom
> prop in
> an object than can be reffed from other objects (why do I get a funny
> that scripts stored in custom props can only be accessed by that
> particular object???)?
You can access custom properties of an object from anywhere, even
another stack, but even so it will be a dynamic script. So that won't
work for you either. Any script that needs "do" in order to execute is
> How about storing the script in the stack / card script and calling it????
That will work, and is what you should do. But note that you can't set
the script of an object to more than 10 lines in a standalone either, so
the script has to be static. Any script longer than that has to be
pre-written and compiled in the IDE.
Since you need the script for several objects, have you considered using
behaviors instead? Compile the script in a button, and then assign that
button as the behavior for all the objects that need to use it.
> How about running down the main street with a plastic bag on my head
> "noodly, noodly, noodly, pip, pip, pip, poop" ?
If you decide to do that, take videos, please. :)
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode