5000 lines of code
Richmond Mathewson
richmondmathewson at gmail.com
Thu Jun 9 05:18:26 EDT 2011
Mark
> Took me a couple of times through that to get what you meant. Ah...
> you mean that same switch code is duplicated in other objects as well.
> What I'd do in that case is move it out of the objects and make a
> handler farther along the message path (the stack script, for
> instance) as
>
> command ParseIt
> switch blahBlahBlah
> end switch
> end ParseIt
>
> then in the mouseUp handlers just say
>
> on mouseUp
> ...
> ParseIt
> ...
> end mouseUp
>
> it's make maintenance much easier and your stack will lose a bit of
> flabbiness in the process.
>
It certainly seemed like good advice until I tried what you suggested:
I moved the "recyclable" code into the stack script and called it from
each object.
BUT, the interesting thing as that, while the objects called the code
successfully, it meant
that the individualised segments of code in the object that came after
the recyclable code
stopped working properly.
This is a right bu**er as your advice would have meant I could reduce my
file size considerably.
Richmond.
More information about the use-livecode
mailing list