Get fillGradient props

Monte Goulding monte at appisle.net
Fri Jul 8 19:08:31 EDT 2016


> On 9 Jul 2016, at 8:33 AM, Dar Scott <dsc at swcp.com> wrote:
> 
>> - declaring variables at the top of the handler or in the block they are used. Ali and I do the latter and Peter B thinks it's poor style because we don't have block scoped variables.
> 
> I usually write small handlers so it doesn't matter, but in a recent project I wrote some very long handlers and I switched to your way to stay organize and document.  (I probably should have sat back and organized my thoughts and used small handlers.)
> 
> I'm assuming "block" in a casual sense of a blank line or two and a line or two of comments followed by code.  
> 
> Are there some potential problems in declaring variables this way?  

Ah, sorry I should have said scope where I said block. What I mean is:

on handler
   local tVarUsedEverywhereInHandler
   if something then
      local tVarJustUsedWithinThisCondition
      ...
   end if
...


More information about the use-livecode mailing list