9
votes
Vote UpVote

Delphi: using IInterface to restore cursor at end of mehod (prelude to a memento that executes any code at end of method).

The Wiert Corner – A long while ago, I wrote about a (then overdue post) on .NET/C#: Using IDisposable to restore temporary settrings example: TemporaryCursor class. I had been using a similar technique in Delphi since before I found out about the TRecall class and thought: I think my TTemporaryCursor is smarter, as it is based on interfaces. TRecall (and the Vcl.Graphics descendants TBrushRecall, TFontRecall, and TPenRecall) store TPersistent properies using the Assign method. They were introduced in Delphi 6. Too bad there are only very few people using TRecall as lots of TPersistent things warrant sasaving ...
Favorite? Off-Topic? Jeroen Pluimers @ 2014-08-06 07:00

Statistics

Visits: 954
Votes: 9
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Andreas Schachtner
DCadarn
Larry Hengen
Radosław Kokoć
Ravaut123
TOndrej
Wouter
Yanniel
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

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