I created a small project using the Delphi FireMonkey platform to try out the new real-time binding function. I want to populate a TListBox with TList<IFoo> elements, and I use the BOCollection Example . BindList.FormatExpressions[0] has values similar to those in the example.
ControlExpression = 'Text' SourceExpression = 'Current.Name'
Now, if I call BindList.FillList , then I get the exception “Can't find Name”. However, if I use a list of objects ( TList<TFoo> instead of TList<IFoo> ), then an exception does not occur, and the list is filled correctly - it works! Therefore, it seems that livebinding cannot find interface properties.
The definition of IFoo is as follows:
IFoo = interface function GetName: string; procedure SetName(const AValue: string); property Name: string read GetName write SetName; end;
Can I bind to working with interfaces?
source share