Vladimir Ulchenko wrote:
> On Thu, 28 Jan 2010 04:47:55 -0800, Rudy Velthuis (TeamB) > <✉rvelthuis.de> wrote: > > > The simpler version was integrated in the JCL (not sure how they > > call the classes now, I called them guard interfaces). > > I wonder how delphi counterpart to one of my one-liners (say > BEGIN_END_UPDATE) could be implemented using JCL ISafeGuard?
I guess one could use a function taking an anonymous method that performed the body, and which surrounded the body with BeginUpdate and EndUpdate.
My guards were more meant to free objects when they leave scope. Some kind of simple RAII objects. -- Rudy Velthuis (TeamB) http://www.teamb.com
"Which is it, is man one of God's blunders or is God one of man's?" -- Nietzsche