On 8/21/17 1:28 PM, Jonathan Lynch via use-livecode wrote:
I agree with Bill. If you lock a door twice on a car, it is still just locked. 
One unlock will open it up. That seems more intuitive.

Initially it's more intuitive, but if it were done this way you couldn't have handlers that manage locks both independently and when called from amother handler. For example:

on updateThings
  lock screen
  set the rect of <something>
  set the loc of <something else>
  updateAllButtonLabels
  unlock screen
end updateThings

on updateAllButtonLabels
  lock screen
  repeat with i = 1 to the number of btns
    set the label of btn i to the cDefaultLabel of btn i
  end repeat
  unlock screen
end updateAllButtonLabels

In this scenario, I can update only the buttons at any time, as well as updating them as part of a larger card update. In either case, the screen will remain locked until everything is done.

This is what I was depending on when I noticed that an unlock with a visual effect didn't honor the lock count. I was getting unexpected visual results when the screen unlocked in a handler being called by a larger one that had already locked the screen.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
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