Can a user control be more than one thing ?

Posted by jmls on 30-Sep-2008 14:46

Let me quickly explain before you all think I'm mad ..

I've created an abl control based on the MS combo-box. I've added some extra properties like "table" and embedded a binding source as well. What I've finished up with is a Combo-box with a built-in binding source. Setting the table property creates a buffer and query, and assigns the bindingsource handle to the query handle.

Everything works fantastic.

Then I wanted to be a little smarter. I wanted to use the bindingsource of the combo box and attach it to a text editor on the same form as the abl control.

The following code then works really well:

THIS-OBJECT:ultraTextEditor1:DataBindings:Add(NEW System.Windows.Forms.Binding("Text", DataCombo1:bindingSource1, "address", TRUE)).

However, what I wanted to do next was to select either the DataCombo control itself, or the bindingsource of the datacombo control as the data source in the properties of the text editor.

I can't see a way of doing this. Anyone got any ideas ?

All Replies

Posted by Admin on 30-Sep-2008 15:13

Short answer is no.

.NET and the ABL do not support multiple-inheritance (more than one SUPER-class).

Some other OO languages do, but I don't have experience with that.

What "MIGHT" work in some future (maybe in 10.2B or so), would be to implement one of the interfaces like IBindingSource or IList. Pretty sure it won't work in 10.2A, because we can't implement indexed properties and events. But that would be very, very nice for the future.

Shelley, how do you think about this? I know you deserve a very long vacation after 10.2A get's released. But there are still features on the wish lists

Message was edited by:

Mike Fechner

Posted by jmls on 01-Oct-2008 04:48

glad to know that I am not mad. Just wierd

Thanks for the comments Mike.

This thread is closed