Vote UpVote

Finding yourself in a property bind

Lars Fosdal – From the wishful thinking department, I would love to be able tovar MyObject : TBoundObject<Boolean>;begin MyObject.Bind(CompilerMagic(TSomeClass.SomeBooleanProperty));end;instead ofvar MyObject : TBoundObject<TSomeClass, Boolean>;begin Src: TSomeClass; MyObject.Bind(Src, 'SomeBooleanProperty');end;Why? Because the first one is resilient to property renaming.Until I can, I am stuck with using something similar tovar Src: TSomeClass; MyObject : TBoundObject<TSomeClass, Boolean>;begin MyObject.Bind(Src, function (const Ref:TSomeClass):Boolean // reads the bound ...
Favorite? Off-Topic? Lars Fosdal @ 2011-05-11 22:02


Visits: 665
Votes: 2
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Daniele Teti
Stefan Glienke
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)