5000 lines of code

Mark Wieder mwieder at ahsoftware.net
Sun Jun 5 14:33:50 CDT 2011


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.

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list