Hey all, I need to add a new data-bindable property to an ABL class inheriting the UltraTextEditor.
DEFINE PUBLIC PROPERTY LookupKeyValue AS CHARACTER NO-UNDO
GET.
SET.
DEFINE PUBLIC EVENT LookupKeyValueChanged DELEGATE System.EventHandler.
[Bindable(true)]
attribute to the property. For the Visual Designer this property now does appear in the (Data Bindings) section of the Property sheet and the Visual Designer generates the required code to add the Binding object during InitializeComponent.
At runtime, an Exception is thrown:
System.ArgumentException: Unable to bind to the property LookupKeyValue of the target control.
So, what's missing to actually make Data binding work for ABL properties? Is that something we can add in the control, an overload to a method etc? Or is this really still a limitation of the ABL GUI for .NET bridge.
I've tested currently on my machine running 10.2B02. I'll test it soon on 10.2B03.
Ok. That wasn't too difficult. The ABL exposes the Property to the .NET side only when it's part of a .NET Interface.
So now with the Bindable attribute set to True and a .NET Interface (defining the Property and the ...Changed Event) binding to an ABL property seems to work.
Hi,
I'm actually trying do to something like that...
And now wondering, how did you add 'dynamically' the bindable(true) attribute ?