Vote UpVote

Running “Any” Code When a Method Ends

The Delphi Geek – Just like (some) other programmers, I like to abuse the fact that the Delphi compiler only destroys local interfaces when a method ends. If you don’t know what I’m talking about, check out the latest Nick’s post in the Fun Code of the Week series.As an example, Nick put together a function which changes application cursor and at the end of the method reverts it back to the previous state.procedure test; begin AutoCursor(crHourGlass); // some long operation // cursor is automatically reverted when ‘test’ exits end; My approach to this pattern is usually slightly different. I like to mark ...
Favorite? Off-Topic? gabr @ 2013-02-27 22:14


Visits: 1019
Votes: 5
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Jørn E. Angeltveit
Mykhaylo Boreyko
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)