5000 lines of code

Richmond Mathewson richmondmathewson at gmail.com
Sun Jun 5 14:52:51 CDT 2011

On 06/05/2011 10:33 PM, Mark Wieder wrote:
> Richmond-
> Sunday, June 5, 2011, 12:07:00 PM, you wrote:
>>> Also, you spend a lot of effort making sure that DDROP has the correct
>>> value, but then you never use it.
>> The switch code is generic, and the DDROP value is used in other objects.
> 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.
Thank you very much for such good advice.

More information about the use-livecode mailing list