The code 10 years from now:

scanMind(currentThought, currentObject, applyNow)

All the code you will ever need.

Bob S


On Jan 29, 2015, at 09:29 , Geoff Canyon 
<[email protected]<mailto:[email protected]>> wrote:

Small thing, but I just turned this twelve-year-old code:

     put "Double-Click:" into tProperty
     if the optionKey is "down" then
        if the commandKey is "down" then
           put "Option-Command-Double-Click:" into tProperty
        else
           put "Option-Double-Click:" into tProperty
        end if
     else if the commandKey is "down" then
        put "Command-Double-Click:" into tProperty
     end if

into this:

     put "Double-Click:" into tProperty
     if the commandKey is "down" then put "Command-" before tProperty
     if the optionKey is "down" then put "Option-" before tProperty

I love turning ten lines of code into three lines of code. I hope twelve
years from now I can look back at those three lines with the same degree of
horror I feel now looking at the ten-line implementation.

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

Reply via email to