View Single Post
09/02/15, 12:32 PM   #26
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
You just need to avoid creating a thousand closures. Once you do that, you will notice that your code doesn't need to call SetHandler a thousand times, because all the calls would be identical. Aim for removing unnecessary closures. Set the handler once after constructing the control.

If you need something more complex, like switching an OnUpdate handler on when resizing and off when it's done, you naturally do have to call SetHandler multiple times, but chances are you don't need to create multiple closures.
  Reply With Quote