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.

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to